Package: bash
Version: 4.4-4
Severity: important

Dear Maintainer,

Man page for bash seems to suggest that any interactive invocations can
be identified simply by checking "$-" for 'i' or testing for the
presence of a non-empty PS1 variable e.g:
- "[[ -v PS1 ]]"
- "[[ -n $PS1 ]]"
- "! [[ -z $PS1 ]]"

All of these tests used to work on my system, but no longer (I suspect
something changed in the last couple of weeks). The only reliable measure
I can use now to see if a script was invoked interactively is to test for
"-t 0" or similar.

I'm not sure if this change in behaviour is wanted or not, but if so then
perhaps an update to the man and info pages should be made?

Also not sure if this limited to Debian or a general issue with bash, but
I've come across this on machines running jessie and stretch.


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bash depends on:
ii  base-files   9.8
ii  dash         0.5.8-2.4
ii  debianutils  4.8.1
ii  libc6        2.24-9
ii  libtinfo5    6.0+20161126-1

Versions of packages bash recommends:
ii  bash-completion  1:2.1-4.3

Versions of packages bash suggests:
pn  bash-doc  <none>

-- no debconf information

Reply via email to