Commit d75e4383 authored by Ivan Mazhukin's avatar Ivan Mazhukin Committed by Vitaly Lipatov

bash_completion: fix bash < v.4 support (eterbug #18367)

parent fc5990ec
...@@ -217,7 +217,7 @@ __eepm_complete_mark() { ...@@ -217,7 +217,7 @@ __eepm_complete_mark() {
fi fi
done done
# TODO logic for others commands # TODO logic for others commands
if [[ -v special ]]; then if [[ -n "$special" ]]; then
case $special in case $special in
hold|unhold) hold|unhold)
__eepm_list_installed_packages __eepm_list_installed_packages
...@@ -244,7 +244,7 @@ __eepm_complete_repo() { ...@@ -244,7 +244,7 @@ __eepm_complete_repo() {
fi fi
done done
# TODO logic for others commands # TODO logic for others commands
if [[ -v special ]]; then if [[ -n "$special" ]]; then
case $special in case $special in
change|set|add|Add) change|set|add|Add)
__eepm_complete_repolist __eepm_complete_repolist
...@@ -286,7 +286,7 @@ __eepm_complete_autoremove() { ...@@ -286,7 +286,7 @@ __eepm_complete_autoremove() {
fi fi
done done
if [[ -v special ]]; then if [[ -n "$special" ]]; then
COMPREPLY=( $(compgen -W "${subcommands}" -- "$cur") ) COMPREPLY=( $(compgen -W "${subcommands}" -- "$cur") )
fi fi
fi fi
...@@ -306,7 +306,7 @@ __eepm_complete_commands() { ...@@ -306,7 +306,7 @@ __eepm_complete_commands() {
fi fi
done done
if [[ -v special ]]; then if [[ -n "$special" ]]; then
case $special in case $special in
install|Install|reinstall|add|i|it|-i|installed) install|Install|reinstall|add|i|it|-i|installed)
__eepm_list_available_packages __eepm_list_available_packages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment