Closed Freed-Wu closed 7 months ago
Completion scripts are already included. You may need to tell your shell to load those files if nvfetcher is not installed globally on your system.
$ tree result
result
├── bin
│ └── nvfetcher
└── share
├── bash-completion
│ └── completions
│ └── nvfetcher
├── fish
│ └── vendor_completions.d
│ └── nvfetcher.fish
└── zsh
└── vendor-completions
└── _nvfetcher
9 directories, 4 files
zsh shell completion should be in share/zsh/site-functions
.
IIUC zsh looks for directories in fpath
.
$ print -l $fpath | grep vendor-completions
/home/berberman/.nix-profile/share/zsh/vendor-completions
/nix/profile/share/zsh/vendor-completions
/home/berberman/.local/state/nix/profile/share/zsh/vendor-completions
/etc/profiles/per-user/berberman/share/zsh/vendor-completions
/nix/var/nix/profiles/default/share/zsh/vendor-completions
/run/current-system/sw/share/zsh/vendor-completions
Oh, I found it. Seem more developers like site-functions
. It should not be a big problem.
❯ eza --icons --git -h /run/current-system/sw/share/zsh/site-functions|wc -l
239
❯ eza --icons --git -h /run/current-system/sw/share/zsh/vendor-completions
_cachix _dpkg-parsechangelog _nvfetcher
Can nvfetch provide completions for common shells?
nvfetch -<TAB>
will complete options. TIA!