-
The default
fzf
key bindings for Tab/Shift+Tab and Ctrl+R/Ctrl+S have been changed to Up/Down in default layout and Down/Up in reversed layout. It is recommended to remove the following lines from~/.zshrc
if you have them:# When fzf menu opens on TAB, another TAB moves the cursor down ('tab:down') # or accepts the selection and triggers another TAB-completion ('tab:repeat')? zstyle ':z4h:fzf-complete' fzf-bindings 'tab:down' # When fzf menu opens on Alt+Down, TAB moves the cursor down ('tab:down') # or accepts the selection and triggers another Alt+Down ('tab:repeat')? zstyle ':z4h:cd-down' fzf-bindings 'tab:down'
-
FreeBSD is no longer supported.
-
zstyle ':z4h:...' passthrough
has been replaced withzstyle ':z4h:...' enable
that has the opposite meaning. The default value isno
. If your~/.zshrc
mentionspassthrough
, you need to change those styles. Here's how it looks in the default.zshrc
now:# Enable ('yes') or disable ('no') automatic teleportation of z4h over # ssh when connecting to these hosts. zstyle ':z4h:ssh:example-hostname1' enable 'yes' zstyle ':z4h:ssh:*.example-hostname2' enable 'no' # The default value if none of the overrides above match the hostname. zstyle ':z4h:ssh:*' enable 'no'
-
Function
ssh
has been moved from.zshrc
to z4h proper. If your.zshrc
defines it, you need to remove it. -
When connecting over ssh to a host for which
zstyle ':z4h:ssh:...' enable
is set to 'no',TERM
value oftmux-256color
gets replaced withscreen-256color
. This can be customized withzstyle ':z4h:ssh:...' term
. -
New option to disable preview in
z4h-fzf-history
:zstyle :z4h:fzf-history fzf-preview no
-
iTerm2 integration can no longer be enabled by sourcing
~/.iterm2_shell_integration.zsh
. Instead, you need to put this line in~/.zshrc
:zstyle ':z4h:' iterm2-integration 'yes'
-
The following bindings have been changed:
- Ctrl+P/Up:
z4h-up-local-history
=>z4h-up-substring-local
- Ctrl+N/Down:
z4h-down-local-history
=>z4h-down-substring-local
- Ctrl+P/Up:
-
The following widgets have been renamed:
z4h-up-local-history
=>z4h-up-prefix-local
z4h-down-local-history
=>z4h-down-prefix-local
z4h-up-global-history
=>z4h-up-prefix-global
z4h-down-global-history
=>z4h-down-prefix-global
-
It's now possible to automatically start
tmux
when zsh4humans is initializing.zstyle :z4h: start-tmux [arg]...
Where
[arg]...
is eitherintegrated
(the default),no
,command <cmd> [flag]...
, orsystem
. The latter is equivalent tocommand tmux -u
. -
Widgets the perform recursive directory traversal (
z4h-cd-down
andz4h-fzf-complete
) now use bfs instead offind
if it's installed. You can get the original behavior with the following declaration:zstyle ':z4h:(cd-down|fzf-complete)' find-command command find
You can also use a custom function in place of
command find
if you want to transform command line arguments. -
z4h-fzf-history
(Ctrl+R) now usesBUFFER
instead ofLBUFFER
for the initial query. This makes a difference only when the widget is invoked when the cursor is not at the very end of the command line. -
All
z4h-kill-*
andz4h-backward-kill-*
widgets now add the killed region to the kill ring. -
z4h install
now allows specifying the branch explicitly:z4h install user/repo@branch
. -
If
brew
is installed, zsh4humans now automatically installshomebrew/command-not-found
. -
command_not_found_handler
now useshomebrew/command-not-found
if it's available. -
Auto-update is now disabled by default. It is recommended to use
z4h update
to update manually. -
Recursive file completions can now be disabled:
zstyle ':z4h:fzf-complete' recurse-dirs 'no'
-
It's now possible to contract prompt on Ctrl+D when using Transient Prompt.
z4h bindkey z4h-eof Ctrl+D setopt ignore_eof
-
There is now builtin integration with direnv. It is much faster than the stock one and works well with all z4h features. Specifically:
- If there is
.envrc
in the current or ancestor directory when starting zsh, it gets ingested before instant prompt. - Messages from direnv are displayed not only if you execute
cd foo
but also when you change the current directory with one of the specialized z4h widgets (z4h-cd-up
,z4h-cd-back
, etc.). - "Loading" and "unloading" notifications from direnv can be suppressed.
Note that powerlevel10k has a prompt segment for direnv. It shows an icon if some
.envrc
has been loaded and not yet unloaded. If you are using direnv, you'll probably want to use this segment. If the icon is enough, consider suppressing "loading" and "unloading" notifications from direnv.Enable direnv integration:
zstyle ':z4h:direnv' enable 'yes'
Disable "loading" and "unloading" notifications from direnv:
zstyle ':z4h:direnv:success' notify 'no'
If you enable direnv integration in this way, the stock integration won't do anything useful. zsh4humans will dismantle it as soon as it sees it. It's highly recommended to remove stock integration calls from your zshrc to avoid wasting time on zsh startup and tripping over direnv quirks. The stock integration calls usually look like this:
eval "$(direnv export zsh)" eval "$(direnv hook zsh)"
Or perhaps like this:
emulate zsh -c "$(direnv export zsh)" emulate zsh -c "$(direnv hook zsh)"
- If there is
-
New zle widget:
z4h-quote-prev-zword
.