Skip to content

Commit

Permalink
Set PWD environment variable
Browse files Browse the repository at this point in the history
This is to make spawned shells and processes to see "logical" path.
  • Loading branch information
me committed Dec 4, 2023
1 parent f2a909d commit 5836960
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -5371,7 +5371,9 @@ static char *readpipe(int fd, char *ctxnum, char **path)
clearselection();
g_state.picker = 0;
g_state.picked = 1;
}
} /* else if (op == 's') { */

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
/* xstrsncpy(lastname, tmp, len + 1); */

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
/* } */

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

*ctxnum = ctx;

Expand Down Expand Up @@ -6835,6 +6837,8 @@ static bool browse(char *ipath, const char *session, int pkey)
setdirwatch();
}

setenv("PWD", path, TRUE);

#ifndef NOX11
xterm_cfg(path);
#endif
Expand Down

0 comments on commit 5836960

Please sign in to comment.