summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/look13
1 files changed, 10 insertions, 3 deletions
diff --git a/bash-completion/look b/bash-completion/look
index 303a7565a..feafe2379 100644
--- a/bash-completion/look
+++ b/bash-completion/look
@@ -20,9 +20,16 @@ _look_module()
return 0
;;
esac
- local IFS=$'\n'
- compopt -o filenames
- COMPREPLY=( $(compgen -f -- $cur) )
+ case $COMP_CWORD in
+ 1)
+ COMPREPLY=( $(compgen -W "$(look "$cur")" -- $cur) )
+ ;;
+ 2)
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ ;;
+ esac
return 0
}
complete -F _look_module look