Finding and opening a file with vim in a single command alias in tcsh
I want to make an alias which would work like this:
vf hello.c
would execute a find command to search for hello.c and open it in the vim editor.
What is the best way to do it? I've tried the following (doesn't work):
alias vf "find -name $* -exec vi {} \;"
alias vf "vi `find -name $*`"
Can anyone he开发者_StackOverflowlp ?
I found the answer after a trial n error:
Use alias vf "find -name \!:1 -exec vi {} \;"
精彩评论