0

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 ?

TCSGrad
  • 11,898
  • 14
  • 49
  • 70

1 Answers1

2

I found the answer after a trial n error:

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

TCSGrad
  • 11,898
  • 14
  • 49
  • 70