This commit is contained in:
16
source/src/dropshell-completion.bash
Executable file
16
source/src/dropshell-completion.bash
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
_dropshell_completions() {
|
||||
local cur
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
# call dropshell to get the list of possiblities for the current argument. Supply all previous arguments.
|
||||
local completions=($(dropshell autocomplete "${COMP_WORDS[@]:1:${COMP_CWORD}-1}"))
|
||||
COMPREPLY=( $(compgen -W "${completions[*]}" -- ${cur}) )
|
||||
return 0
|
||||
}
|
||||
|
||||
# Register the completion function
|
||||
complete -F _dropshell_completions dropshell
|
||||
complete -F _dropshell_completions ds
|
Reference in New Issue
Block a user