Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Have you tried Terminal.app?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Have you tried Terminal.app?
Authored by: nyarlathotep on Mar 02, '04 02:02:12AM

This is NOT how things are done in modern shells.

Step 1. Type "fink install bash-completion"
Step 2. Open a new terminal window, type scp .bash_history blah:<tab><tab> where blah is a system you have passwordless ssh authentication to (say via an ssh-agent).

Notice anything? Yes, thats right, it frigging sshed to blah and found all those frigging completions for you!!!!!

Now the one correct way to do this is to add application name completions to bash, by adding a file called /sw/etc/bash_completion.d/Applications

This file will look something like:

alias app='open -a'
_app() {
...
}
complete -F _app $nospace app

where the internals of the _app function resemble the _scp function from the file /sw/etc/bash_completion, but instead of using ssh to fetch the info with ls, it fetches the info with one of the miriade other shell scripts posted inside this hint. I do not feel like writing it now, but it should be very easy.



[ Reply to This | # ]