summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-01-20 13:59:38 +0700
committerShulhan <ms@kilabit.info>2024-01-20 13:59:38 +0700
commit9bc70d5b638d70f4d09da415423745cd2dc1e8b2 (patch)
treef06087ac5e9318237b6bae838320586340cdfb37
parent71b40922e6b6cc4f2d4b3fa94cbe586720bf6f8c (diff)
downloadawwan-9bc70d5b638d70f4d09da415423745cd2dc1e8b2.tar.xz
completions: enable completion on first parameter in local and play
The first parameter of "local" and "play" command is the path to file to execute.
-rw-r--r--_sys/usr/share/bash-completion/completions/awwan12
1 files changed, 10 insertions, 2 deletions
diff --git a/_sys/usr/share/bash-completion/completions/awwan b/_sys/usr/share/bash-completion/completions/awwan
index fd805a3..4337b7f 100644
--- a/_sys/usr/share/bash-completion/completions/awwan
+++ b/_sys/usr/share/bash-completion/completions/awwan
@@ -47,10 +47,18 @@ _awwan_completions()
help)
;;
local)
- COMPREPLY=($(compgen -A file -X "?(*.log|.*)" -- "$key"))
+ case $COMP_CWORD in
+ 2)
+ COMPREPLY=($(compgen -A file -X "?(*.log|.*)" -- "$key"))
+ ;;
+ esac
;;
play)
- COMPREPLY=($(compgen -A file -X "?(*.log|.*)" -- "$key"))
+ case $COMP_CWORD in
+ 2)
+ COMPREPLY=($(compgen -A file -X "?(*.log|.*)" -- "$key"))
+ ;;
+ esac
;;
serve)
COMPREPLY=($(compgen -A directory -- "$key"))