A mostly unopinionated fish shell plugin for chezmoi.
It provides automatic completion and a function wrapper around chezmoi
to not
force a sub-shell when calling chezmoi cd
.
Chezmoi completions behaviour (which is only run in interactive shells) can be
adjusted with the universal variable $halostatue_fish_chezmoi_completion_mode
.
This can be set to one of the following values:
never
: Do nothing.source
: Always source the output ofchezmoi completion fish
.save
: Ifchezmoi
is newer than the firstchezmoi.fish
completion file found in$fish_complete_path
, save the output ofchezmoi completion fish
to the localvendor_completions.d
path.default
(or unset): Ifchezmoi
is newer than the firstchezmoi.fish
completion file in$fish_complete_path
, source the output ofchezmoi completion fish
.
If chezmoi
is newer than a local vendor_completions.d/chezmoi.fish
, the
local completion file will be removed.
Note
The local completion path is $XDG_DATA_HOME/fish/vendor_completions.d
, or
$HOME/.local/share/fish/vendor_completions.d
if $XDG_DATA_HOME
is unset.
A function wrapper for chezmoi
has been provided to permit chezmoi cd
to
work without creating a sub-shell. To use the original functionality, use
command chezmoi cd
.
This can be disabled by setting $halostatue_fish_chezmoi_cd
to the value
subshell
.
Install with Fisher:
fisher install halostatue/fish-chezmoi@v1
- fish 3.4+
$ fish-chezmoi example
example output