Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: FAQ title bar answer using chpwd()
On Mar 6, 10:40pm, Andrew Janke wrote:
}
} http://zsh.sourceforge.net/FAQ/zshfaq03.html#l23
}
} Answer 3.6 suggests using chpwd() to emit terminal control sequences to
} update the title bar for Apple's Terminal.app. This probably isn't the
} right place to do it, because cd's can happen inside functions,
} pipelines, and so on whose output is going to be captured for use
} elsewhere. The terminal control sequences will contaminate the captured
} output instead of going to the terminal.
If you've actually examined the FAQ example, you'll see
[[ -t 1 ]] || return
which means to do nothing if the standard output is not a terminal.
That's a perfectly reasonable solution to the issue described here:
} https://github.com/robbyrussell/oh-my-zsh/issues/3524
In short, the FAQ answer is correct and whoever created the chpwd to
which that issue refers, has coded it wrong.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author