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

RE: Problem with function



> i want to use dynamic titles with screen. That why's i want to do a
> print before each command, like this :
> 
> mutt () {
>         print -Pn "\e]0; Mutt\a"
>         \mutt
> }
> 
> when i do that, i still have the mutt's completion, but when i press
> enter, the print are executed (and work with screen) but the zsh
> session crash :(
> 

Set title in preexec function. You do not say what version you have;
info from current version:

preexec
     Executed just after a command has been read and is about to be
     executed.  If the history mechanism is active (and the line was not
     discarded from the history buffer), the string that the user typed
     is passed as the first argument, otherwise it is an empty string.
     The actual command that will be executed (including expanded
     aliases) is passed in two different forms: the second argument is
     a single-line, size-limited version of the command (with things
     like function bodies elided); the third argument contains the full
     text that is being executed.

-andrej



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