Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New session not expanding \W in bash prompt correctly #1413

Closed
mklein994 opened this issue Jan 5, 2020 · 2 comments
Closed

New session not expanding \W in bash prompt correctly #1413

mklein994 opened this issue Jan 5, 2020 · 2 comments

Comments

@mklein994
Copy link
Contributor

mklein994 commented Jan 5, 2020

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.

@mklein994
Copy link
Contributor Author

Pretty sure it stems from e28be01.

@ghost ghost added the bug report label Jan 5, 2020
@fornwall
Copy link
Member

fornwall commented Jan 5, 2020

@mklein994 Thanks a lot! Will be fixed by 566d656 in version 0.88, to be released shortly.

@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants