Skip to content

Commit

Permalink
Added zsh completions
Browse files Browse the repository at this point in the history
  • Loading branch information
fredricocalamari committed Nov 6, 2024
1 parent d03ffc2 commit 206d698
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions share/linux/completions/zsh/_keepassxc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#compdef keepassxc

_arguments -s \
'--help[Displays help on commandline options]' \
'--help-all[Displays help including Qt specific options]' \
'--version[Displays version information]' \
'--config[Specify path to a custom config file]:config:_files' \
'--localconfig[Specify path to a custom local config file]:localconfig:_files' \
'--lock[Lock all open databases]' \
'--keyfile[Specify the key file of the database]:keyfile:_files' \
'--pw-stdin[Read password of the database from stdin]' \
'--debug-info[Displays debugging information]' \
'--allow-screencapture[Allow screenshots and app recording (Windows/macOS)]' \
'--qmljsdebugger[Activate the QML/JS debugger with a specified port]:port:_values "port" "block"' \
'--platform[QPA plugin, see QGuiApplication documentation]:platformName:options' \
'--platformpluginpath[Path to the platform plugins]:path:_files' \
'--platformtheme[Specify the platform theme]:theme' \
'--plugin[Load additional plugin, can be specified multiple times]:plugin' \
'--qwindowgeometry[Specify window geometry for the main window]:geometry' \
'--qwindowicon[Default window icon]:icon:_files' \
'--qwindowtitle[Title of the first window]:title' \
'--reverse[Sets the application layout direction to Qt::RightToLeft (debugging helper)]' \
'--session[Restores the application from an earlier session]:session' \
'*:filename(s):_files -g "*.kdbx"'
17 changes: 17 additions & 0 deletions share/linux/completions/zsh/install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Quick Guide: Installing Zsh Completion Files

1. Place completion files in one of these locations:
- /usr/local/share/zsh/site-functions/
- /usr/share/zsh/site-functions/
- ~/.zsh/completion/

2. To use a custom directory (e.g., ~/my_custom_completions) for completions:
- Add to ~/.zshrc: fpath=(~/my_custom_completions $fpath)

3. Ensure Zsh loads and uses your completions:
- Add to ~/.zshrc: autoload -U compinit && compinit

4. Apply changes:
- Run: source ~/.zshrc or restart terminal

Note: Check your completion files are chmod 644

0 comments on commit 206d698

Please sign in to comment.