English 中文(简体)
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 help ?

问题回答

I found the answer after a trial n error:

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





相关问题
Hibernate, aliases

I noticed that hibernate generates different aliases for the same columns each time i try to access the same table: Hibernate: select person0_.id as id0_0_, person0_.nam as nam0_0_, person0_.fam as ...

Namespaces, aliases and Visual Studio Forms Designer

I m having a problem with conflicting namespaces and code that gets autogenerated by the forms designer in Visual Studio 2008. I have search many forums and different documentation, but have not been ...

httpd.conf: ignore certain directories?

I have an httpd.conf file that looks like this: Alias /media/ /var/projects/potato_gun/media/ WSGIScriptAlias / /var/projects/potato_gun/django.wsgi The problem is, I broke all my URLs that start ...

SQLite column aliasing

Premise I recently ran into a bug in a select statement in my code. It was fairly trivial to fix after I realized what was going on, but I m interested in finding a way to make sure a similar bug ...

热门标签