Skip to content

Commit

Permalink
Merge branch 'completion'
Browse files Browse the repository at this point in the history
- bash completion
- zsh completion

resolves #26
  • Loading branch information
Ckath committed Oct 11, 2019
2 parents a18289f + ac38233 commit 493d32f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions completions/bash/fuf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
complete -W "-a -A -s -S -t -T -v -h" -o dirnames fuf
18 changes: 18 additions & 0 deletions completions/zsh/_fuf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#compdef fuf
#
# Completion definition for fuf.

setopt localoptions noshwordsplit noksharrays
local -a args
args=(
'(-a)-a[sort alphabetical, this is default]'
'(-A)-A[sort alphabetical, reversed]'
'(-s)-s[sort by size]'
'(-S)-S[sort by size, reversed]'
'(-t)-t[sort by time]'
'(-T)-T[sort by time, reversed]'
'(-v)-v[version info]'
'(-h)-h[usage info]'
'*:filename:_files'
)
_arguments -S -s $args
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ install: ${NAME}
@echo installing scripts
@mkdir -p ${DESTDIR}/lib/${NAME}
@cp -f scripts/* ${DESTDIR}/lib/${NAME}
@cp -f completions/zsh/_${NAME} ${DESTDIR}/share/zsh/site-functions/
@cp -f completions/bash/${NAME} ${DESTDIR}/share/bash-completion/completions/
uninstall: ${NAME}
@echo removing executable file from ${DESTDIR}/bin
@rm -f ${DESTDIR}/bin/${NAME}
@echo removing scripts
@rm -rf ${DESTDIR}/lib/${NAME}
@rm ${DESTDIR}/share/zsh/site-functions/_${NAME}
@rm ${DESTDIR}/share/bash-completion/completions/${NAME}

0 comments on commit 493d32f

Please sign in to comment.