retitle 482194 bash.bashrc, skel/.bashrc: please use $-, not $PS1, to detect
interactive shells
# documentation
severity 482194 minor
tags 482194 =
quit
Jilles Tjoelker wrote:
> Some shells indeed seem to not set PS1 for non-interactive shells.
> However, it seems bad to rely on this to detect n
tags 482194 + moreinfo
quit
Hi again,
Jonathan Nieder wrote:
> I can't reproduce this, though I suppose that's not so surprising given
> that I'm trying bash 4.1-3.
Can't reproduce with bash 3.2-4 from lenny, either. Given that
/etc/skel/.bashrc relies on $PS1 being set or not set depending on
Some shells indeed seem to not set PS1 for non-interactive shells.
However, it seems bad to rely on this to detect non-interactive shells.
I don't see language in POSIX that says PS1 should not be set for
non-interactive shells. Some people export PS1 in their shell startup
files, breaking the chec
Hi Steffen,
Sorry for a long silence.
Steffen Grunewald wrote:
> Version: 3.1dfsg-8
[...]
> PS1 (the "normal" prompt of bash) is set (in /etc/bash.bashrc?) independently
> of
> whether the invocation was done interactively or non-interactively.
[...]
> To reproduce:
> ssh remotehost 'echo
Package: bash
Version: 3.1dfsg-8
Severity: important
PS1 (the "normal" prompt of bash) is set (in /etc/bash.bashrc?) independently of
whether the invocation was done interactively or non-interactively.
This makes non-interactive access undestinguishable from interactive access,
which sometimes m
5 matches
Mail list logo