ITADN

[FEATURE] improve bash completion script

#3633Closedipariparipa 创建于 2026-05-31
Type: Feature
I
ipariparipacommented
``` # Bash completion script for QOwnNotes _QOwnNotes() { COMPREPLY=() local current="${COMP_WORDS[COMP_CWORD]}" local prev="${COMP_WORDS[COMP_CWORD-1]}" _init_completion || return local commands="--h --help --portable --dump-settings --version --allow-multiple-instances --clear-settings --session --action --completion --decrypt-note --decrypt-note-password " if [[ "$prev" == "--decrypt-note" ]]; then compopt -o filenames _filedir return 0 fi if [[ "$prev" == "--decrypt-note-password" ]]; then return 0 fi if [[ "$prev" == "--session" ]]; then return 0 fi if [[ "$prev" == "--action" ]]; then return 0 fi if [[ "$prev" == "--completion" ]]; then COMPREPLY=( $(compgen -W "bash fish" -- "$current") ) return 0 fi COMPREPLY=( $(compgen -W "${commands}" -- ${current}) ) return 0 } complete -F _QOwnNotes QOwnNotes ```
关闭于 2026-06-02 5 条评论