Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: what is the effect of a percentage sign (%) as last character on the command line



On 01/22/2010 03:27 AM, Bart Schaefer wrote:
On Jan 21, 11:21pm, Peter wrote:
}
} p% zsh -v
} ( lot of output )

Er, well, yes, that output is what was important.
Ok, sorry, I got it, in fact, my .zshrc was still active after zsh -f ( because this didn't clear the previous settings ) and after zsh -l in a fresh shell
I found the bug:

I had  in .zshrc

case $TERM in
    (xterm*|rxvt|mrxvt)
    print -Pn "\e]0;%n@%m: $1\a"
    ;;
  esac

apparently , the $1 caused the problem, I replaced it with ~% and now the shell behaves as expected:

case $TERM in
    (xterm*|rxvt|mrxvt)
    print -Pn "\e]0;%n@%m: %~\a"
    ;;
  esac

I take it as an exercise for 2010 to understand why the first version causes the erroneous behavior (;-

Thanks a lot for you hints.

Peter



Messages sorted by: Reverse Date, Date, Thread, Author