# Bash completion for lbin # Source this file: . lbin-completion.bash _lbin_completions() { local cur prev commands cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" commands="f file o oneshot u url ou oneshot_url r remote help" case "$prev" in lbin) # Complete commands or files if [[ "$cur" == -* ]]; then COMPREPLY=($(compgen -W "-h --help -o --oneshot" -- "$cur")) else COMPREPLY=($(compgen -W "$commands" -- "$cur")) # Also complete files COMPREPLY+=($(compgen -f -- "$cur")) fi ;; f|file|o|oneshot) # Complete files only COMPREPLY=($(compgen -f -- "$cur")) ;; u|url|ou|oneshot_url|r|remote) # No completion for URLs COMPREPLY=() ;; *) # Default to file completion COMPREPLY=($(compgen -f -- "$cur")) ;; esac } complete -o default -F _lbin_completions lbin