From c42ae31a190834df88af3339465e4ee2429b7592 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 20 Jul 2010 18:59:15 +0000 Subject: 28081: cdr tweaks --- Doc/Zsh/contrib.yo | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Doc') 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 -- cgit 1.4.1