From ee4e6b2190885c70eeba95496a472032bb9ab36d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 20 Jul 2020 10:44:12 +0300 Subject: [PATCH] .shellrc: Check completion for `bg`, `fg`, `jobs` and `unset` --- .shellrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.shellrc b/.shellrc index 62e1f0b..a75cae9 100644 --- a/.shellrc +++ b/.shellrc @@ -111,6 +111,16 @@ if test -n "$BASH_VERSION"; then ! has_completion $cmd && complete -o default -A hostname $cmd done + for cmd in bg fg jobs; do + ! has_completion $cmd && complete -A job $cmd + done + + complete -A job j wait + + for cmd in unset; do + ! has_completion $cmd && complete -A variable -A function $cmd + done + if [ -d "$HOME"/.bash_completion.d ]; then for _compf in "$HOME"/.bash_completion.d/*; do . $_compf @@ -139,8 +149,6 @@ if test -n "$BASH_VERSION"; then delegate_completion ssh s delegate_completion wget wget-m wget-wrapper ww - complete -A job bg fg j jobs wait - complete -A variable -A function unset unset _BASH_COMPLETIONS_DIR has_completion delegate_completion if [ -d "$HOME/lib/config" ]; then -- 2.39.5