Closed adityam closed 13 years ago
Does ZSH expand the named directory in your prompt (the %~
token)?
Yes it does. After
cd ~ecse321
the prompt says
adityam@adi-netbook:~ecse321$
and the xterm title says
Terminal: ~ecse321
In case it was not clear in the original request, I do not want wmii to know about the zsh named directories. I am OK with Mod-Enter
just ignoring non-existing directories like ~ecse321
. It should not hang the system.
Since your prompt expands the named directory, try overriding the default terminal title function with your own that uses %~
. Here is an example: https://github.com/sunaku/home/blob/master/.zshrc#L49
I misunderstood the word "expand" in your previous question. The shell does not expand ~ecse321
to its full path; it just shows it as ~ecse321
. Looking at http://zsh.sourceforge.net/Doc/Release/Expansion.html#SEC77 it appears that this is on purpose.
My .zshrc already contains:
if [ -z "$DISPLAY" ] ; then ; else # Set xterm title to command name preexec () { if [ -z "$(ps | grep vim)" ] ; then print -Pn "\e]2;$1\a" fi } # reset xterm title precmd () { if [ -z "$(ps | grep vim)" ] ; then print -Pn "\e]2;Terminal: %~\a" fi } fi
Try using %/
(which expands into an absolute path of $PWD) instead of %~
in your pre* functions.
Works perfectly. Thank you for your support on this non-wmii issue.
I use wmii with zsh. Zsh allows one to create named directories. I have a directory called
ecse321
in my.zshrc
. This allows me to useto cd to the path that
ecse321
points to. Of course, other programs, like wmii and Ruby do not know about these path. This however causes wmii to hang. To reproduce this:Mod+Enter
to launch a new terminal.Wmii stops responding to all keyboard events. You can still use the mouse to move to different clients on the current view, but cannot change the view. The
wmiirc.log
file saysAny ideas on how to avoid this?