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

preexec and multi-line command.



Hi there!

I have starge problem after I added preexec function to my zshrc to
add in terminal TITLE what is running inside.

## cut here
case $TERM in
        rxvt*|xterm|nxterm|gnome|screen)
        precmd () {print -Pn "\e]0;%n@%m: %~\a"}
        preexec () { print -Pn "\e]0;$1 [%n@%m: %~]\a"}
        ;;
esac
## cut here

Issue is that when I doing something multiline, I got:

## cut here
slashbeast@ragnarok ~ % echo 1\
slashbeast@ragnarok ~ > 2\
slashbeast@ragnarok ~ > 3\
slashbeast@ragnarok ~ >

2
3
 [slashbeast@ragnarok: ~]123
slashbeast@ragnarok ~ %
## cut here

How can I fix it?



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