[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash Completion
From: |
Luis Garcia Alanis |
Subject: |
Bash Completion |
Date: |
11 Mar 2002 02:24:57 +0000 |
Hi,
For all of you that know what bash_completion is.
I have written 2 scripts for
1) gopen
2) openapp
gopen <TAB>
will show and autocomplete all .app files intalled
openapp <tab> will show and autocomplete all .app on ./ dir
_gopen()
{
local cur app
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
app=`for i in $GNUSTEP_LOCAL_ROOT/Applications/*.app
$GNUSTEP_SYSTEM_ROOT/Applications/*.app; do basename $i; done;`
COMPREPLY=($(compgen -W '$app' |grep ^$cur))
return 0
}
complete -F _gopen -o dirnames gopen
complete -f -X '!*.@(app)' openapp
--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bash Completion,
Luis Garcia Alanis <=