add bash completion scripts
This commit is contained in:
@ -38,7 +38,7 @@ export BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@ --with systemd,quilt
|
||||
dh $@ --with systemd,quilt,bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
@ -39,7 +39,7 @@ export BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@
|
||||
dh $@ --with bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
@ -38,7 +38,7 @@ export BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
dh $@ --with systemd,bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
@ -36,7 +36,7 @@ export DEBIANVERSION := $(shell dpkg-parsechangelog |awk -F' ' '/^Version:/{prin
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
dh $@ --with systemd,bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
@ -38,7 +38,7 @@ export BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
dh $@ --with systemd,bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
1
debian/i2p-router.bash-completion
vendored
Normal file
1
debian/i2p-router.bash-completion
vendored
Normal file
@ -0,0 +1 @@
|
||||
installer/resources/bash-completion/eepget
|
2
debian/i2p.bash-completion
vendored
Normal file
2
debian/i2p.bash-completion
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
installer/resources/bash-completion/i2prouter
|
||||
installer/resources/bash-completion/i2prouter-nowrapper
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -38,7 +38,7 @@ export BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
|
||||
%:
|
||||
dh $@ --with systemd,quilt
|
||||
dh $@ --with systemd,quilt,bash-completion
|
||||
|
||||
clean: createcopyright
|
||||
|
||||
|
55
installer/resources/bash-completion/eepget
Normal file
55
installer/resources/bash-completion/eepget
Normal file
@ -0,0 +1,55 @@
|
||||
_eepget()
|
||||
{
|
||||
local cur prev opts
|
||||
_init_completion || return
|
||||
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="-c -e -h -l -m -n -o -p -t -u -x"
|
||||
|
||||
case "${prev}" in
|
||||
-e|-h|-u|-x)
|
||||
return
|
||||
;;
|
||||
-l|-m|-t)
|
||||
if [[ $cur == "" ]]; then
|
||||
COMPREPLY=( $( compgen -P "$cur" -W "{1..9}" ) )
|
||||
elif [[ $cur == "0" ]]; then
|
||||
COMPREPLY=( $( compgen -W "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -P "$cur" -W "{0..9}" ) )
|
||||
fi
|
||||
compopt -o nospace
|
||||
return
|
||||
;;
|
||||
-n)
|
||||
if [[ $cur == "0" ]]; then
|
||||
COMPREPLY=( $( compgen -W "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -P "$cur" -W "{0..9}" ) )
|
||||
fi
|
||||
compopt -o nospace
|
||||
return
|
||||
;;
|
||||
-o)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
-p)
|
||||
_known_hosts_real "$cur"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ${cur} == h* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "http://{a..z}" -- $cur) )
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ${cur} == -* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
complete -F _eepget eepget
|
12
installer/resources/bash-completion/i2prouter
Normal file
12
installer/resources/bash-completion/i2prouter
Normal file
@ -0,0 +1,12 @@
|
||||
_i2prouter()
|
||||
{
|
||||
local cur prev opts
|
||||
_init_completion || return
|
||||
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="console start stop graceful restart condrestart status install remove dump"
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
}
|
||||
complete -F _i2prouter i2prouter
|
12
installer/resources/bash-completion/i2prouter-nowrapper
Normal file
12
installer/resources/bash-completion/i2prouter-nowrapper
Normal file
@ -0,0 +1,12 @@
|
||||
_i2prouter-nowrapper()
|
||||
{
|
||||
local cur prev opts
|
||||
_init_completion || return
|
||||
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts=""
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
}
|
||||
complete -F _i2prouter-nowrapper i2prouter-nowrapper
|
Reference in New Issue
Block a user