views:

32

answers:

1

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 help ?

A: 

I found the answer after a trial n error:

Use alias vf "find -name \!:1 -exec vi {} \;"

shan23