Package: bash

Version: 5.2.37 (1)-release (x86_64-pc-linux-gnu)

Severity: minor

Tags: trixie regression

Description:

The \w escape sequence in bash prompts does not display the current directory when the user is in the /root directory on Debian Trixie. This behavior appears to be a regression from previous Debian versions.

Steps to reproduce:
1. Set PS1 to use \w: export PS1='\h:\w\$ '
2. Navigate to /root directory: cd /root
3. Observe that the prompt shows only hostname:$ instead of hostname:/root$

Expected behavior:
The prompt should display the full current directory path, including when in /root.

Actual behavior:
The \w escape sequence fails to display the current directory when in /root, but works correctly in all other directories.

Workaround:
Using $PWD instead of \w works correctly: export PS1='\h:$PWD\$ '

Additional information:
- This issue appears to be specific to Debian Trixie
- The behavior was not present in previous Debian versions
- The issue affects both regular root login and sudo sessions
- Other prompt escape sequences (like \h for hostname) work correctly

Environment:
- Debian version: Trixie
- Shell: bash
- Terminal: Tested in both Konsole and PuTTY


--
This email has been checked for viruses by Avast antivirus software.
www.avast.com

Reply via email to