Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2016 16:13:10 -0500
From:      Brandon Allbery <allbery.b@gmail.com>
To:        Johan Hendriks <joh.hendriks@gmail.com>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: output to file different than console. (ssh and zfs )
Message-ID:  <CAKFCL4WL2ABa8iZQ0p2w8S7ALtdxA3fVPpPcTC=_-8WdCtXsjw@mail.gmail.com>
In-Reply-To: <56E1E262.5000504@gmail.com>
References:  <56E1B925.5060105@gmail.com> <CAKFCL4UON30j1-wNLUnbzmQRKxmhPUL8zOS7uaGo=Ph1Kq19pg@mail.gmail.com> <56E1BFD6.60906@gmail.com> <CAKFCL4VZNRBhz2C-g8fESESuOkMJZiA6YiY5oOcfZnSOZGbV2Q@mail.gmail.com> <56E1E262.5000504@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 10, 2016 at 4:08 PM, Johan Hendriks <joh.hendriks@gmail.com>
wrote:
>
> Op 10/03/16 om 19:43 schreef Brandon Allbery:
>
> On Thu, Mar 10, 2016 at 1:41 PM, Johan Hendriks < <joh.hendriks@gmail.com>
> joh.hendriks@gmail.com> wrote:
>
>> mytitle
>
>
> if ($?prompt) mytitle
>
> If I change mytitle to if ($?prompt) mytitle I get the following error.
> mytitle: command not found.
>
> This is how I have set it.
> alias mytitle 'printf "\033]0;$HOST\a"'
> if ($?prompt) mytitle
>

gah, csh! The one-line if form won't work with aliases. You need to use the
long form. :( This should work, then:

if ($?prompt) then
    mytitle
endif

(if not then I'll have to dig up whether aliases are any weirder in csh,
like in ksh/bash they don't take effect in the file in which they're
defined --- although that clearly is not the case here)

I actually do title setting as part of prompt setup, so it automatically
behaves nicely with non-interactive use, but that's a bit too much for csh
to handle (I use zsh).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKFCL4WL2ABa8iZQ0p2w8S7ALtdxA3fVPpPcTC=_-8WdCtXsjw>