From owner-freebsd-stable@freebsd.org Thu Mar 10 21:13:11 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2FCDACB197 for ; Thu, 10 Mar 2016 21:13:11 +0000 (UTC) (envelope-from allbery.b@gmail.com) Received: from mail-vk0-x22a.google.com (mail-vk0-x22a.google.com [IPv6:2607:f8b0:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD2E69D for ; Thu, 10 Mar 2016 21:13:11 +0000 (UTC) (envelope-from allbery.b@gmail.com) Received: by mail-vk0-x22a.google.com with SMTP id c3so111524077vkb.3 for ; Thu, 10 Mar 2016 13:13:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=D6/8xfzBJn00LTYhpv1iuwaGHB+RTHrOTwMZsT2y8v4=; b=wUx+gM5ymz04IVFKi26k6JHCH4/KcTR/fDJWJOyzmLvRlvjcyQ1Yzzqc80Ihhmhvwf B55xoAAgWqwnNfLpxCJZDyLZXXmqYHXO0IFWk/QbQfXeM83hJpq4Qh8jlDXeD4zufBic lY5iVXs8kpyUhcQTvcuoDX39x1sVaLO+OAPPW7VhkkHaVJLBBW/5a3tQMgP0n+ZtWzKW 9pZ83t3/LozSKyOyLJloY/rZ12VHXCyXkJLnEE7s7Qp3GrOPCCwpKJbxyNJe9IfooAf2 JqkKIdRbxkHjgSQ3DEWh6+ejZ2nOYTgonxX4/ouB/w3/96i9yuCDKHUJB/9xzhUxU0bb LHOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=D6/8xfzBJn00LTYhpv1iuwaGHB+RTHrOTwMZsT2y8v4=; b=i+3K4UffUnKGzXHs3FP22/tjYrMgTXadpJI5F+fm/KKptGq/E8/P2DwE1kxDLEKYv+ T4PjWM/oFEEseSuLO3hwr2jyiXJx1GGO3MVNtRBAZ7MiZnzx9BwW7OJg7efMeHJKgyHH L+S3BExpujrqFDMyESIhCbBzzDz5H/kfiRUl2krpoxUhzQt7gXxSMKsJbSrRS5u/a0GM RIGKA+8qFXIkYQtthCGK51jTPcKwRnuUBwcqojyEEwZW7ZmgApxRB5Zfocq2m/Y7tBi4 TtEedSP8bGk67kpSjKwn6Sd6h0ja0760kfBF+l//FkU0Yt5IVLXL9LPSlg0rwdCP+C9o zMHg== X-Gm-Message-State: AD7BkJIf4rXf547iOrC6/ZNj0tFsI172NYaR7ehuElgv2NRnCFBTC0UQYRGPI7ZnkVFg6KjX8XeiPOC6aRCHxg== MIME-Version: 1.0 X-Received: by 10.31.167.195 with SMTP id q186mr5843648vke.113.1457644390356; Thu, 10 Mar 2016 13:13:10 -0800 (PST) Received: by 10.176.3.236 with HTTP; Thu, 10 Mar 2016 13:13:10 -0800 (PST) In-Reply-To: <56E1E262.5000504@gmail.com> References: <56E1B925.5060105@gmail.com> <56E1BFD6.60906@gmail.com> <56E1E262.5000504@gmail.com> Date: Thu, 10 Mar 2016 16:13:10 -0500 Message-ID: Subject: Re: output to file different than console. (ssh and zfs ) From: Brandon Allbery To: Johan Hendriks Cc: freebsd-stable Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 21:13:12 -0000 On Thu, Mar 10, 2016 at 4:08 PM, Johan Hendriks 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> 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