diff --git a/debian-alt/jessie/rules b/debian-alt/jessie/rules index 94ad107b23640514dedaffdef41aaaa208b3274b..9fadb6a2b1ccc6d2aeb650344c4406042fbd4a38 100755 --- a/debian-alt/jessie/rules +++ b/debian-alt/jessie/rules @@ -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 diff --git a/debian-alt/precise/rules b/debian-alt/precise/rules index 826b6a5fa07c422181432bada098ab8d631427d9..3962457e55156dbf2b0c41d4a8d0e3ce9ccc5daa 100755 --- a/debian-alt/precise/rules +++ b/debian-alt/precise/rules @@ -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 diff --git a/debian-alt/trusty/rules b/debian-alt/trusty/rules index a4907fef8fa3359f968d03f7e9b8b3f9b9b766b7..e33ce31f44595bb70d0eaaf42bede417796dead6 100755 --- a/debian-alt/trusty/rules +++ b/debian-alt/trusty/rules @@ -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 diff --git a/debian-alt/wheezy/rules b/debian-alt/wheezy/rules index 61b5ac37f4c00442fc1e17270318d2d0a7aba1bf..b96fecdd144b4ad3f422e28eae4742dc8aefd336 100755 --- a/debian-alt/wheezy/rules +++ b/debian-alt/wheezy/rules @@ -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 diff --git a/debian-alt/xenial/rules b/debian-alt/xenial/rules index c70f1943831b2ca11c15a08c3ed0e22db50002a2..9734f3442bb4be17c6348b293bffe31876e03914 100755 --- a/debian-alt/xenial/rules +++ b/debian-alt/xenial/rules @@ -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 diff --git a/debian/i2p-router.bash-completion b/debian/i2p-router.bash-completion new file mode 100644 index 0000000000000000000000000000000000000000..bfb55196fbd4893ed332cc64443f25dfcb92fe34 --- /dev/null +++ b/debian/i2p-router.bash-completion @@ -0,0 +1 @@ +installer/resources/bash-completion/eepget diff --git a/debian/i2p.bash-completion b/debian/i2p.bash-completion new file mode 100644 index 0000000000000000000000000000000000000000..d82584a60ca5c2c0d98f073b922dff2c6353637d --- /dev/null +++ b/debian/i2p.bash-completion @@ -0,0 +1,2 @@ +installer/resources/bash-completion/i2prouter +installer/resources/bash-completion/i2prouter-nowrapper diff --git a/debian/rules b/debian/rules index 00f0f6b93b26b5e7d58a7c5e1d8841a653e3c873..5b8cc658c984520c80fba50cfabcc1bf409298c3 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/installer/resources/bash-completion/eepget b/installer/resources/bash-completion/eepget new file mode 100644 index 0000000000000000000000000000000000000000..388c51d4b26041496b6673172d2dd268e787448a --- /dev/null +++ b/installer/resources/bash-completion/eepget @@ -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 diff --git a/installer/resources/bash-completion/i2prouter b/installer/resources/bash-completion/i2prouter new file mode 100644 index 0000000000000000000000000000000000000000..14d3b1f16c989d8e09fa3817b0e9b25fb75ac475 --- /dev/null +++ b/installer/resources/bash-completion/i2prouter @@ -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 diff --git a/installer/resources/bash-completion/i2prouter-nowrapper b/installer/resources/bash-completion/i2prouter-nowrapper new file mode 100644 index 0000000000000000000000000000000000000000..b5dffa33c4ccbcc6870266019f35ea659688e58d --- /dev/null +++ b/installer/resources/bash-completion/i2prouter-nowrapper @@ -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