Find and edit files simultaneously

BeOS queries can make your life easier in ways you might not expect. This method uses queries to allow you to find and launch any file quickly, regardless the current directory. For example, if you’re sitting in a Terminal at /boot/home and want to edit a file living in /boot/home/projects/reports/March/daily… you don’t have to cd to that location or enter the whole path.
To make this work, add this to your .profile:

function qed {
/boot/apps/Eddie/Eddie $(query name=$*|tr "
" " ") &
}

Substitute the path to Eddie above with the path to Pe, StyledEdit, or whatever your favorite editor is. Now, if you want to edit a file called „frop“ living anywhere on your hard drive, all you have to do is type:

qed frop

Note that this technique does require you to know the exact filename, and doesn’t deal well when paths to files have spaces in them.

 

Comments

No comments so far.

(comments are closed)

Kategorien

 
 
Blogroll
Resources