report the working directory to the terminal with OSC 7
Before each prompt gosh sends ESC ] 7 ; file://host/path BEL (host and path percent-encoded), so terminals like GNOME Terminal open new tabs and windows in the directory of the shell instead of the one gosh was started in. Nothing is sent if stdout is not a terminal or TERM=dumb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1f507f6562
commit
af5281eed2
4 files changed
+80
No files matched your search
@@ -739,6 +739,13 @@ If the last command failed, its exit status is shown as
|
||||
.BI [ N ]
|
||||
before the
|
||||
.BR $ .
|
||||
.PP
|
||||
Before each prompt, gosh reports the working directory to the terminal with
|
||||
the OSC 7 escape sequence
|
||||
.RB ( "ESC ] 7 ; file://" \fIhost\fP/\fIpath\fP " BEL" ),
|
||||
so terminals like GNOME Terminal open new tabs and windows in the same
|
||||
directory. Nothing is sent if the output is not a terminal or
|
||||
.BR TERM=dumb .
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B GOSH_HISTFILE
|
||||
|
||||
Reference in new issue
Block a user