开发者

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 {} \;"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜