X-Git-Url: https://git.armaanb.net/?p=charsel.git;a=blobdiff_plain;f=shell-completions;fp=shell-completions;h=172eb4ba5cfbee892a51247e0785aa7b6b4464d1;hp=0000000000000000000000000000000000000000;hb=3175a81c8c551bb01af2dbc2737718dbb3ab0090;hpb=74601c376caedf65d541ab67e63513448a9bd7ec diff --git a/shell-completions b/shell-completions new file mode 100755 index 0000000..172eb4b --- /dev/null +++ b/shell-completions @@ -0,0 +1,12 @@ +charfiles() +{ + _script_commands=$(charsel -L) + + local cur prev + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + COMPREPLY=( $(compgen -W "${_script_commands}" -- ${cur}) ) + + return 0 +} +complete -o nospace -F charfiles charsel