summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-29 20:49:05 +0200
committerBram Moolenaar <Bram@vim.org>2021-03-29 20:49:05 +0200
commit8b9abfd86c736ed3f298dfa8b50a962c118b3983 (patch)
tree65874e39326cd7bfa6f8a73861bb00d01d5e4d76 /runtime
parent9dbe701fe19597ad59c0e0c70a05927b587bea9f (diff)
patch 8.2.2675: directory change in a terminal window shell is not followedv8.2.2675
Problem: Directory change in a terminal window shell is not followed. Solution: Add the 'autoshelldir' option. (closes #6290)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt9
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/optwin.vim2
3 files changed, 12 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 7fcdfbe953..babe7217d0 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -749,6 +749,15 @@ A jump table for the options with a short description can be found at |Q_op|.
or selected.
Note: When this option is on some plugins may not work.
+ *'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
+'autoshelldir' 'asd' boolean (default off)
+ global
+ When on, Vim will change the current working directory whenever you
+ change the directory of the shell running in a terminal window. You
+ need proper setting-up, so whenever the shell's pwd changes an OSC 7
+ escape sequence will be emitted. For example, on Linux, you can source
+ /etc/profile.d/vte.sh in your shell profile if you use bash or zsh.
+
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
local to window
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index c0a070d248..ead42f9968 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -605,6 +605,7 @@ Short explanation of each option: *option-list*
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
+'autoshelldir' 'asd' change directory to the shell's current directory
'arabic' 'arab' for Arabic as a default second language
'arabicshape' 'arshape' do shaping for Arabic characters
'autoindent' 'ai' take indent for new line from previous line
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 45aa8f9307..176f9eafc8 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -266,6 +266,8 @@ if exists("+autochdir")
call <SID>AddOption("autochdir", gettext("change to directory of file in buffer"))
call <SID>BinOptionG("acd", &acd)
endif
+call <SID>AddOption("autoshelldir", gettext("change to pwd of shell in terminal buffer"))
+call <SID>BinOptionG("asd", &asd)
call <SID>AddOption("wrapscan", gettext("search commands wrap around the end of the buffer"))
call <SID>BinOptionG("ws", &ws)
call <SID>AddOption("incsearch", gettext("show match for partly typed search command"))