- very basic look(1) completion
This commit is contained in:
parent
8e9c9a64f3
commit
5d97a2c928
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.457 2002/10/23 15:50:04 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.458 2002/10/23 16:05:16 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -4007,6 +4007,22 @@ _removepkg()
|
||||
[ $have ] && complete -F _removepkg $filenames removepkg &&
|
||||
complete -o dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg
|
||||
|
||||
# look(1) completion
|
||||
#
|
||||
have look &&
|
||||
_look()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
|
||||
if [ $COMP_CWORD = 1 ]; then
|
||||
COMPREPLY=( $( compgen -W '$(look $cur)' ) )
|
||||
fi
|
||||
}
|
||||
[ "$have" ] && complete -F _look $default look
|
||||
|
||||
_filedir_xspec()
|
||||
{
|
||||
local IFS cur xspec
|
||||
|
Loading…
x
Reference in New Issue
Block a user