3
I got this alias for searching for a file recursively and case insensitive
type fr
fr is aliased to `find . | grep -i'
and so let's say i'm searching for a file
fr nsstring+util
./Build/Intermediates/SmartTaxi.build/Debug-iphonesimulator/SmartTaxi.build/Objects-normal/i386/NSString+Util.d
./Build/Intermediates/SmartTaxi.build/Debug-iphonesimulator/SmartTaxi.build/Objects-normal/i386/NSString+Util.dia
./Build/Intermediates/SmartTaxi.build/Debug-iphonesimulator/SmartTaxi.build/Objects-normal/i386/NSString+Util.o
./SmartTaxi/Classes/Categories/NSString+Util.h
./SmartTaxi/Classes/Categories/NSString+Util.m
and i want to select the last file.. without having to leave the keybaord and highlighting it etc.. is there a shortcut for that on cli?
To be more specific.. the entire scenario is - search for a file - see retrieved results - basically execute a command on one of them.. in this case I just want to run
vi SmartTaxi/Classes/Categories/NSString+Util.m
without leaving the keyboard
Update:
The idea is that this command must be done in two parts:
- fr filename and manually see the results returned.. there could be many results and the desired one could be in any one of the lines
- vi %result of above command% at a specific line
@vembutech i'm not sure i understand.. can you repeat the above point using my example? – abbood – 2014-12-26T08:10:48.527
I use M-x grep-find in emacs. I don't know how to do that in vi. – umeboshi – 2014-12-26T09:58:36.887