dropshell/source/src/dropshell-completion.bash
Your Name 93e563948f
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Shift things around
2025-05-17 10:18:25 +12:00

16 lines
506 B
Bash
Executable File

#!/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