ce84db593c
Adds __fish_config_op_enabled helper (master __fish_config_opinionated evaluated first via __fish_variable_check, then the category variable) and gates C1-C4 components: CachyOS surgical override, PAGER/MANPAGER, CDPATH, Vi mode, exit override, bang-bang bindings, history/cp/mv/wget/ grep aliases, cd->z alias, Fisher bootstrap and theme apply, paru/yay wrapper generation, WakaTime hook, custom key chords, puffer, autopair, starship prompt, Catppuccin colors, FZF_DEFAULT_OPTS, done notifications, and Kitty/WezTerm window-management abbreviations.
33 lines
1.0 KiB
Fish
33 lines
1.0 KiB
Fish
status is-interactive || exit
|
|
|
|
# Local modification: opinionated guard (AGENTS.md Task #3). Puffer's key
|
|
# intercepts are part of the bang-bang system, gated atomically under C3
|
|
# overrides with conf.d/tricks.fish, conf.d/abbr.fish, and expand_*.fish.
|
|
__fish_config_op_enabled __fish_config_op_overrides || exit
|
|
|
|
function _puffer_fish_key_bindings --on-variable fish_key_bindings
|
|
set -l modes
|
|
if test "$fish_key_bindings" = fish_default_key_bindings
|
|
set modes default insert
|
|
else
|
|
set modes insert default
|
|
end
|
|
|
|
bind --mode $modes[1] '.' _puffer_fish_expand_dot
|
|
bind --mode $modes[1] '!' _puffer_fish_expand_bang
|
|
bind --mode $modes[1] '$' _puffer_fish_expand_buck
|
|
bind --mode $modes[1] '*' _puffer_fish_expand_star
|
|
bind --mode $modes[2] --erase '.' '!' '$' '*'
|
|
end
|
|
|
|
_puffer_fish_key_bindings
|
|
|
|
set -l uninstall_event puffer_fish_key_bindings_uninstall
|
|
|
|
function _$uninstall_event --on-event $uninstall_event
|
|
bind -e '.'
|
|
bind -e '!'
|
|
bind -e '$'
|
|
bind -e '*'
|
|
end
|