feat(deps): add fish-deps unified dependency management command #17

Merged
rootiest merged 21 commits from feat/fish-deps into main 2026-05-19 03:53:52 +00:00
Showing only changes of commit f09006846b - Show all commits
+10 -5
View File
@@ -221,13 +221,18 @@ function fzf_key_bindings
end end
# Prepend the options to allow user customizations # Prepend the options to allow user customizations
# wrap-word requires the same newer fzf as bg-transform; fall back to plain wrap if test "$_fzf_transform_action" = bg-transform
set -l _fzf_wrap_opt wrap # Newer fzf: dynamic show/hide preview based on terminal width
test "$_fzf_transform_action" = bg-transform; and set _fzf_wrap_opt wrap-word
set -p -- FZF_DEFAULT_OPTS \ set -p -- FZF_DEFAULT_OPTS \
'--bind="focus,resize:'$_fzf_transform_action':if test \\"$FZF_COLUMNS\\" -gt 100 -a \\\\( \\"$FZF_SELECT_COUNT\\" -gt 0 -o \\\\( -z \\"$FZF_WRAP\\" -a (string length -- {}) -gt (math $FZF_COLUMNS - 4) \\\\) -o (string collect -- {2..} | fish_indent | count) -gt 1 \\\\); echo show-preview; else echo hide-preview; end"' \ '--bind="focus,resize:bg-transform:if test \\"$FZF_COLUMNS\\" -gt 100 -a \\\\( \\"$FZF_SELECT_COUNT\\" -gt 0 -o \\\\( -z \\"$FZF_WRAP\\" -a (string length -- {}) -gt (math $FZF_COLUMNS - 4) \\\\) -o (string collect -- {2..} | fish_indent | count) -gt 1 \\\\); echo show-preview; else echo hide-preview; end"' \
'--preview="string collect -- (test \\"$FZF_SELECT_COUNT\\" -gt 0; and string collect -- {+2..}) \\"\\n# \\"'$date_cmd' {2..} | fish_indent --ansi"' \ '--preview="string collect -- (test \\"$FZF_SELECT_COUNT\\" -gt 0; and string collect -- {+2..}) \\"\\n# \\"'$date_cmd' {2..} | fish_indent --ansi"' \
'--preview-window="right,50%,'$_fzf_wrap_opt',follow,info,hidden"' '--preview-window="right,50%,wrap-word,follow,info,hidden"'
else
# Older fzf: static preview; focus/resize events not reliably supported
set -p -- FZF_DEFAULT_OPTS \
'--preview="string collect -- (test \\"$FZF_SELECT_COUNT\\" -gt 0; and string collect -- {+2..}) \\"\\n# \\"'$date_cmd' {2..} | fish_indent --ansi"' \
'--preview-window="right,50%,wrap,follow,info"'
end
end end
set -lx FZF_DEFAULT_OPTS_FILE set -lx FZF_DEFAULT_OPTS_FILE