[feature] Add common shells completions (#44)

master
Ivan 3 years ago committed by GitHub
parent 2a1364817a
commit d39c8a9d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,8 @@
_smug_list_projects () {
if [ "${#COMP_WORDS[@]}" != "2" ]; then
return
fi
COMPREPLY=($(ls ~/.config/smug | grep -v "smug\.log" | sed -e 's/\..*//'))
}
complete -F _smug_list_projects smug

@ -0,0 +1 @@
complete -x -c smug -a "(ls ~/.config/smug | grep -v \"smug\.log\" | sed -e 's/\..*//')"
Loading…
Cancel
Save