mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
chdir to the displayed directory
This isn't necessary for the actual operation of ncdu, but helps tools like screen/tmux open a new terminal in the currently viewed directory, which is what people probably expect.
This commit is contained in:
parent
936a9446a8
commit
20e1fbce46
1 changed files with 4 additions and 0 deletions
|
|
@ -189,6 +189,10 @@ static void dirlist_fixup() {
|
|||
void dirlist_open(struct dir *d) {
|
||||
dirlist_par = d;
|
||||
|
||||
/* not necessary for any ncdu functionality,
|
||||
* but enables screen/tmux to work out our cwd */
|
||||
chdir(getpath(dirlist_par));
|
||||
|
||||
/* set the head of the list */
|
||||
head_real = head = d == NULL ? NULL : d->sub;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue