zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: $_tty is gone after system upgrade
Date: Sun, 25 Sep 2022 17:42:26 +0200	[thread overview]
Message-ID: <CAN=4vMq8_GtRLTuXKSPwPNuAb8usDs=DNSqBujxwhH8xbsc-uA@mail.gmail.com> (raw)
In-Reply-To: <34ffd90d-24f5-25b0-7b47-188c63e52cef@eastlink.ca>

On Sun, Sep 25, 2022 at 5:33 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> I'm upgrading my system from Debian 9 to Debian 11 and my zsh is now
> whatever Debian installed (vs. old system where I was running Roman's
> pre-build). Prompt is:
>
>      PS1=$'\n$_tty $_yel%d $_mag$cc$_nrm $ '
>
> ... which returned just the number of the current terminal on the old
> system but now
>
>      $ echo $_tty
>
> ... returns nothing.

I don't recall any version of zsh setting _tty. Debian 9 doesn't set it either.

    % docker run -e TERM --rm -it debian:stretch bash -c '
      apt-get update && apt-get install -y zsh && zsh -c "typeset -p TTY _tty"'
    [...]
    zsh:typeset:1: no such variable: _tty
    typeset TTY=/dev/pts/0

If you were using https://github.com/romkatv/zsh-bin, that would be
zsh 5.8. It doesn't set _tty.

In any case, it seems better to use ${TTY:t} given that this parameter
is (and has been for a long time) documented and working as intended.

Roman.


  reply	other threads:[~2022-09-25 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 15:32 Ray Andrews
2022-09-25 15:42 ` Roman Perepelitsa [this message]
2022-09-25 15:51   ` Ray Andrews
2022-09-25 17:09     ` Peter Stephenson

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='CAN=4vMq8_GtRLTuXKSPwPNuAb8usDs=DNSqBujxwhH8xbsc-uA@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@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).