From: Bart Schaefer <schaefer@brasslantern.com>
To: Andrew Janke <janke@pobox.com>, zsh-workers@zsh.org
Subject: Re: FAQ title bar answer using chpwd()
Date: Fri, 6 Mar 2015 23:20:24 -0800 [thread overview]
Message-ID: <150306232024.ZM12511@torch.brasslantern.com> (raw)
In-Reply-To: <54FA731B.8050800@pobox.com>
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.
next prev parent reply other threads:[~2015-03-07 7:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 3:40 Andrew Janke
2015-03-07 4:19 ` Daniel Shahaf
2015-03-07 7:33 ` Bart Schaefer
2015-03-07 7:20 ` Bart Schaefer [this message]
2015-03-13 0:39 ` Lawrence Velázquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=150306232024.ZM12511@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=janke@pobox.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).