-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Labels
Description
Problem description
When I create a new session in Termux, the bash prompt ($PS1) doesn't expand \W as expected.
Steps to reproduce
Setup:
# ~/.bashrc
export PS1='\W$ 'Initial session:
~$ pwd && echo $PWD
/data/data/com.termux/files/home
/data/data/com.termux/files/home
~$ mkdir -p test/dir
~$ cd test/dir
dir$ pwd && echo $PWD
/data/data/com.termux/files/home/test/dir
/data/data/com.termux/files/home/test/dir
dir$ In a new session:
$ pwd && echo $PWD
/data/data/com.termux/files/home/test/dir
/data/data/com.termux/files/home/test/dir/
$ Expected behavior
Opening a new session shouldn't mangle the prompt. It seems the \W escape character isn't expecting a trailing slash in $PWD.
Additional information
termux-info:
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# unstable-repo (sources.list.d/unstable.list)
deb https://dl.bintray.com/xeffyr/unstable-packages unstable main
Updatable packages:
All packages up to date
Android version:
9
Kernel build information:
Linux localhost 4.14.83-perf+ #1 SMP PREEMPT Thu Sep 26 15:22:17 KST 2019 aarch64 Android
Device manufacturer:
LGE
Device model:
LM-G820
I can provide logcat logs if you need them.