Skip to content

Instantly share code, notes, and snippets.

@Rodsevich
Last active January 29, 2018 05:13
Show Gist options
  • Save Rodsevich/e8e2fc79a927e1f4b55548828192d89e to your computer and use it in GitHub Desktop.
Save Rodsevich/e8e2fc79a927e1f4b55548828192d89e to your computer and use it in GitHub Desktop.
Una forma en dart de tener bash completion
#Esto debería ir en /etc/bash_completion.d/<cmd>
# sino en >> ~/.bashrc
if type complete &>/dev/null; then
_<cmd>_completion () {
local cur options #declara variables solo para esta función
cur="${COMP_WORDS[COMP_CWORD]}"
options=$( <cmd> completion options $COMP_LINE )
COMPREPLY=( $( compgen -W "$options" -- $cur ) )
}
complete -F _<cmd>_completion <cmd>
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment