summaryrefslogtreecommitdiff
path: root/Doc/Zsh/contrib.yo
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r--Doc/Zsh/contrib.yo18
1 files changed, 17 insertions, 1 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index ca00ad118..e33ac9b9e 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -453,12 +453,28 @@ are shown first. The special value tt(+) can appear in the list to
indicate the default file should be read at that point. This allows
effects like the following:
-example(zstyle recent-dirs-file ':chpwd:*' \
+example(zstyle ':chpwd:*' recent-dirs-file \
~/.chpwd-recent-dirs-${TTY##*/} +)
Recent directories are read from a file numbered according to
the terminal. If there are insufficient entries the list
is supplemented from the default file.
+
+It is possible to use tt(zstyle -e) to make the directory configurable
+at run time:
+
+example(zstyle -e ':chpwd:*' recent-dirs-file pick-recent-dirs-file
+pick-recent-dirs-file() {
+ if [[ $PWD = ~/text/writing(|/*) ]]; then
+ reply=(~/.chpwd-recent-dirs-writing)
+ else
+ reply=(+)
+ fi
+})
+
+In this example, if the current directory is tt(~/text/writing) or a
+directory under it, then use a special file for saving recent
+directories, else use the default.
)
item(tt(recent-dirs-insert))(
Used by completion. If tt(recent-dirs-default) is true, then setting