Skip to content

Commit

Permalink
Add helpful commentary to bash shell-completion script
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jun 5, 2017
1 parent ff5e53f commit 019a21f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli/shell-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

completions() {
local cur

# Magic to treat colons in completion strings as normal characters (part 1)
_get_comp_words_by_ref -n : cur

options="$(shell-completion-for-medic-conf $COMP_CWORD $cur)"

# Tell complete what stuff to show.
COMPREPLY=($(compgen -o dirnames -W "$options" -- "$cur"))

# Magic to treat colons in completion strings as normal characters (part 2)
__ltrim_colon_completions "$cur"
}

Expand Down

0 comments on commit 019a21f

Please sign in to comment.