This package's /usr/share/zsh/manjaro-zsh-config file defines zsh hooks that override expected window title behavior of oh-my-zsh.
This becomes very noticeable in manjaro-sway with sworkstyle icons and other things that depend on window titles being set properly.
Manjaro Sway edition installs manjaro-sway/oh-my-zsh by default, including oh-my-zsh in /usr/share/oh-my-zsh/.
Problem Code
Right now the code here results in window title with only the current working directory (and 15-char left truncation). Support for currently running command in window title is broken.
The hook ordering places mzc_* after omz_* functions managing the same state. Effectively this results in manjaro-zsh-config overriding oh-my-zsh, whether or not the user wants this.
Duplicating this zsh hook here results in a few problems:
Divergence from upstream oh-my-zsh version of termsupport.zsh
Description of Issue
This package's
/usr/share/zsh/manjaro-zsh-config
file defineszsh
hooks that override expected window title behavior ofoh-my-zsh
.This becomes very noticeable in
manjaro-sway
withsworkstyle
icons and other things that depend on window titles being set properly.Manjaro Sway edition installs
manjaro-sway/oh-my-zsh
by default, includingoh-my-zsh
in/usr/share/oh-my-zsh/
.Problem Code
Right now the code here results in window title with only the current working directory (and 15-char left truncation). Support for currently running command in window title is broken.
It looks like the title setting code was added in this commit, and probably copied directly from
oh-my-zsh
(seetermsupport.zsh
somewhere around this commit). Later, functions were renamed with prefixmzc_
to avoid namespace collision. However, the functions effectively conflict with each other due to having side-effects (e.g. setting the shared-state of the window title).The hook ordering places
mzc_*
afteromz_*
functions managing the same state. Effectively this results inmanjaro-zsh-config
overridingoh-my-zsh
, whether or not the user wants this.Duplicating this
zsh
hook here results in a few problems:oh-my-zsh
version oftermsupport.zsh
oh-my-zsh
has changed quite a bit with many bugfixes and features including support forfoot
terminal (the default inmanjaro-sway
).DISABLE_AUTO_TITLE
variable currently disables both themzc_*
hook functions provided by this package, and theomz_*
ones inoh-my-zsh
.oh-my-zsh
versions.mzc_*
hooks here and useomz_*
ones./usr/share/zsh/manjaro-zsh-config
which will break on next package upgrade.Debug Info
Here are the current
zsh
hooks onmanjaro-sway
, in order of execution:Expand for
zhooks
output```zsh $ zhooks ## From this plugin: https://github.com/agkozak/zhooks precmd_functions: _p9k_do_nothing _pyenv_virtualenv_hook omz_termsupport_precmd _zsh_highlight_main__precmd_hook mzc_termsupport_precmd mzc_termsupport_cwd _zsh_autosuggest_start _p9k_precmd preexec_functions: _p9k_preexec1 omz_termsupport_preexec _zsh_highlight_preexec_hook mzc_termsupport_preexec _p9k_preexec2 zshexit_functions: _p9k_worker_cleanup _gitstatus_cleanup_POWERLEVEL9K-_p9k_ ```