Skip to content

Commit

Permalink
Added bash completion script
Browse files Browse the repository at this point in the history
  • Loading branch information
Conner.Will committed May 6, 2024
1 parent 003c83e commit 6259059
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions completion/yayfzf_completion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# yayfzf Bash completion script

_yayfzf() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-h --help -k --keybindings -V --version"

case "${prev}" in
-h|--help|-k|--keybindings|-V|--version)
return 0
;;
esac

if [[ "${cur}" == -* ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi

COMPREPLY=( $(compgen -f -- "${cur}") )
}

complete -F _yayfzf yayfzf

0 comments on commit 6259059

Please sign in to comment.