aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/keep.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_completion.d/keep.bash')
-rw-r--r--bash/bash_completion.d/keep.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bash_completion.d/keep.bash b/bash/bash_completion.d/keep.bash
index 00b1469e..6829db9c 100644
--- a/bash/bash_completion.d/keep.bash
+++ b/bash/bash_completion.d/keep.bash
@@ -25,7 +25,7 @@ _keep() {
# Keepable names: all functions and variables
(keep)
compgen -A function -A variable \
- -- "${COMP_WORDS[COMP_CWORD]}"
+ -- "$2"
;;
# Kept names: .bash-suffixed names in keep dir
@@ -43,7 +43,7 @@ _keep() {
# Build list of kept names
dir=${BASHKEEP:-"$HOME"/.bashkeep.d}
- cword=${COMP_WORDS[COMP_CWORD]}
+ cword=$2
kept=("$dir"/"$cword"*.bash)
kept=("${kept[@]##*/}")
kept=("${kept[@]%.bash}")