| Summary: | A trailing / in --workdir argument messes up how PS1 is displayed in konsole | ||
|---|---|---|---|
| Product: | [Applications] konsole | Reporter: | Ahmad Samir <a.samirh78> |
| Component: | general | Assignee: | Konsole Bugs <konsole-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | adaptee |
| Priority: | NOR | ||
| Version First Reported In: | 2.8.999 | ||
| Target Milestone: | --- | ||
| Platform: | Unlisted Binaries | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 4.8.1 | |
| Sentry Crash Report: | |||
Thanks for reporting. This looks like a side effect of commit 790e835c6fab58a5c4bfe00559d3a4ee97b84e38, which sets environment $PWD additionally. Will fix it soon. Git commit fdca5195cc46a12bb62444b31867ce69a75830e7 by Jekyll Wu. Committed on 09/02/2012 at 14:47. Pushed by jekyllwu into branch 'master'. Remove trailing slash when settings initial working directory FIXED-IN: 2.8.1 M +11 -3 src/Pty.cpp http://commits.kde.org/konsole/fdca5195cc46a12bb62444b31867ce69a75830e7 Git commit 16233a4b2b9d1c39f4c0ea6d5272ffcaa8bbde6c by Jekyll Wu. Committed on 09/02/2012 at 14:47. Pushed by jekyllwu into branch 'KDE/4.8'. Remove trailing slash when settings initial working directory FIXED-IN: 2.8.1 (cherry picked from commit fdca5195cc46a12bb62444b31867ce69a75830e7) M +11 -3 src/Pty.cpp http://commits.kde.org/konsole/16233a4b2b9d1c39f4c0ea6d5272ffcaa8bbde6c I can confirm the fix. This fixes a bug with Dolphin where opening a terminal, using Shift+F4, in a dir: - After going up, Alt+Up OR - Right clicking a search result in Dolphin and selecting "Open path in a new tab" would exhibit this bug, where the current working dir isn't shown in the prompt. Thanks :) |
It seems that --workdir doesn't handle trailing /'s correctly: $ konsole --workdir /usr/share/icons/ Konsole displays this: [a@localhost ]$ But this works correctly: $ konsole --workdir /usr/share/icons [a@localhost icons]$ notice how the basename of the dir path, "icons", isn't displayed in the first case. My shell is BASH, here's some info: $ echo $PS1 [\u@\h \W]\$ $ echo $PROMPT_COMMAND printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}" $ echo $PWD /usr/share/icons/