Bug 244449

Summary: detect symbolic links in pwd when creating new tab
Product: [Applications] konsole Reporter: Constantin Berzan <cberzan>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: wishlist CC: adaptee, erin-kde
Priority: NOR    
Version: 2.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Constantin Berzan 2010-07-13 02:08:54 UTC
Version:           2.5 (using KDE 4.4.4) 
OS:                Linux

I often have a deeply nested directory (~/abc/2010/summer/project123) symlinked to something shorter (~/now). If I cd ~/now in Konsole and then create a new tab, the new tab starts in the expanded (real) directory ~/abc/2010/summer/project123.  It would be really great if Konsole could detect the symbolic link, and create the new tab in the same directory (~/now).

Reproducible: Always

Steps to Reproduce:
cd /tmp
mkdir -p deeply/nested/dir
ln -s deeply/nested/dir short
cd short
<Ctrl+Shift+N>

Actual Results:  
new tab is created in /tmp/deeply/nested/dir

Expected Results:  
new tab would ideally be created in /tmp/short
Comment 1 Jekyll Wu 2011-07-24 06:28:17 UTC
That sounds nice, but I doubt whether it is possible to implement that.

konsole gets the PWD of the terminal process(shell,vim,etc) by looking at(on Linux) /proc/<pid>/cwd, which is itself a symlink pointing to the expanded PWD in absolute path. when you have a symlink, you can easily know its target. But when you only have the target, how can you find which symlink has taken you here?
Comment 2 Kurt Hindenburg 2011-07-24 12:58:07 UTC
I agree w/ #1, there is another bug report about symlinks that I looked into it.  I don't think this possible.
Comment 3 Erin Yuki Schlarb 2021-05-16 14:26:47 UTC
Would it be possible to fix this one now since Konsole does display the unresolved working directory path in its title/tab bar nowadays?
Comment 4 Erin Yuki Schlarb 2021-05-16 16:58:27 UTC
NVM, the comment at https://bugs.kde.org/show_bug.cgi?id=327720#c1 explains what is needed to make this work.

Turns out oh-my-zsh has support for this limited to macOS' iTerm.app at the moment. I'll open a PR with them instead.