feat: add autocomplete to fx command

This commit is contained in:
2021-07-04 15:54:39 +02:00
parent e42c80e553
commit 26cb75bb2f
3 changed files with 31 additions and 0 deletions

19
completions/_fx Executable file
View File

@ -0,0 +1,19 @@
#compdef fx
_fx(){
local state
_arguments \
'1: :->action'\
'*: :->folder_name'
case $state in
(action) _arguments '1:profiles:(s i o)' ;;
(*) compadd "$@" $(echo $(ls ~/SYNC) | tr \\n ' ')
esac
}
_fx "$@"