about summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-09-05 21:35:57 +0200
committertoonn <toonn@toonn.io>2021-09-05 21:38:21 +0200
commit0bfc8ef636936534b228557674b56a7fb5b84e07 (patch)
treef9e739b60ceb43be675ec760cd81ee58a416a7ae /doc
parentc9483afe890ad3efb7c76212512aa0e587116ebf (diff)
downloadranger-0bfc8ef636936534b228557674b56a7fb5b84e07.tar.gz
doc: Document setinpath and setinregex
Fixes #2355
Diffstat (limited to 'doc')
-rw-r--r--doc/ranger.140
-rw-r--r--doc/ranger.pod40
2 files changed, 57 insertions, 23 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 361ce182..c005afee 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.9.3" "2021-09-02" "ranger manual"
+.TH RANGER 1 "ranger-1.9.3" "2021-09-05" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -1288,6 +1288,8 @@ ranger.  For your convenience, this is a list of the \*(L"public\*(R" commands i
 \& search pattern
 \& search_inc pattern
 \& set option value
+\& setinpath [path=<path>] option value
+\& setinregex [re=<regex>] option value
 \& setintag tags option value
 \& setlocal [path=<path>] option value
 \& shell [\-FLAGS...] command
@@ -1693,6 +1695,30 @@ doesn't work for functions and regular expressions. Valid values are:
 \& list           | 1,2,3,4
 \& none           | none
 .Ve
+.IP "setinpath [path=\fIpath\fR] \fIoption\fR \fIvalue\fR" 2
+.IX Item "setinpath [path=path] option value"
+Assigns a new value to an option, but locally for the directory given by
+\&\fIpath\fR. This means, that this option only takes effect when visiting that
+directory. If no path is given, uses the current directory.
+.Sp
+\&\fIpath\fR can be quoted with either single or double quotes to prevent unwanted
+splitting, \fIpath='~/dl dl'\fR or \fIpath=\*(L"~/dl dl\*(R"\fR. You can use \*(L"pattern\*(R" rather
+than \*(L"path\*(R" for consistency with \f(CW\*(C`setinregex\*(C'\fR.
+.IP "setinregex [re=\fIregex\fR] \fIoption\fR \fIvalue\fR" 2
+.IX Item "setinregex [re=regex] option value"
+Assigns a new value to an option, but locally for directories matching
+\&\fIregex\fR. This means, that this option only takes effect when visiting such
+directories. If no regular expression is given, uses the current directory.
+.Sp
+\&\fIregex\fR is a regular expression.  This means that \f(CW\*(C`re=~/dl\*(C'\fR applies to all
+paths that start with \fI~/dl\fR, e.g. \fI~/dl2\fR and \fI~/dl/foo\fR. To avoid this,
+use \f(CW\*(C`path=~/dl$\*(C'\fR.  To specify a folder with special characters
+(.^$\e*+?(){}[]|), escape them with a backslash.
+.Sp
+\&\fIregex\fR can be quoted with either single or double quotes to prevent unwanted
+splitting,. \fIre='~/dl dl$'\fR or \fIre=\*(L"~/dl dl$\*(R"\fR. You can use \*(L"regex\*(R" rather
+than \*(L"re\*(R" to avoid having to remember the spelling and you can use \*(L"pattern\*(R"
+for consistency with \f(CW\*(C`setinpath\*(C'\fR.
 .IP "setintag \fItags\fR \fIoption\fR \fIvalue\fR" 2
 .IX Item "setintag tags option value"
 Assigns a new value to an option, but locally for the directories that are
@@ -1707,17 +1733,7 @@ with the \fIv\fR tag by typing \fI"v\fR, then use this command:
 .Ve
 .IP "setlocal [path=\fIpath\fR] \fIoption\fR \fIvalue\fR" 2
 .IX Item "setlocal [path=path] option value"
-Assigns a new value to an option, but locally for the directory given by
-\&\fIpath\fR. This means, that this option only takes effect when visiting that
-directory. If no path is given, uses the current directory.
-.Sp
-\&\fIpath\fR is a regular expression.  This means that \f(CW\*(C`path=~/dl\*(C'\fR applies to all
-paths that start with \fI~/dl\fR, e.g. \fI~/dl2\fR and \fI~/dl/foo\fR. To avoid this,
-use \f(CW\*(C`path=~/dl$\*(C'\fR.  To specify a folder with special characters
-(.^$\e*+?(){}[]|), escape them with a backslash.
-.Sp
-\&\fIpath\fR can be quoted with either single or double quotes to prevent unwanted
-splitting. \fIpath='~/dl dl$'\fR or \fIpath=\*(L"~/dl dl$\*(R"\fR
+Alias for \f(CW\*(C`setinpath\*(C'\fR.
 .IP "shell [\-\fIflags\fR] \fIcommand\fR" 2
 .IX Item "shell [-flags] command"
 Run a shell command.  \fIflags\fR are discussed in their own section.
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 5138a15e..bf92d1d4 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -1388,6 +1388,8 @@ ranger.  For your convenience, this is a list of the "public" commands including
  search pattern
  search_inc pattern
  set option value
+ setinpath [path=<path>] option value
+ setinregex [re=<regex>] option value
  setintag tags option value
  setlocal [path=<path>] option value
  shell [-FLAGS...] command
@@ -1837,6 +1839,32 @@ doesn't work for functions and regular expressions. Valid values are:
  list           | 1,2,3,4
  none           | none
 
+=item setinpath [path=I<path>] I<option> I<value>
+
+Assigns a new value to an option, but locally for the directory given by
+I<path>. This means, that this option only takes effect when visiting that
+directory. If no path is given, uses the current directory.
+
+I<path> can be quoted with either single or double quotes to prevent unwanted
+splitting, I<path='~/dl dl'> or I<path="~/dl dl">. You can use "pattern" rather
+than "path" for consistency with C<setinregex>.
+
+=item setinregex [re=I<regex>] I<option> I<value>
+
+Assigns a new value to an option, but locally for directories matching
+I<regex>. This means, that this option only takes effect when visiting such
+directories. If no regular expression is given, uses the current directory.
+
+I<regex> is a regular expression.  This means that C<re=~/dl> applies to all
+paths that start with I<~/dl>, e.g. I<~/dl2> and I<~/dl/foo>. To avoid this,
+use C<path=~/dl$>.  To specify a folder with special characters
+(.^$\*+?(){}[]|), escape them with a backslash.
+
+I<regex> can be quoted with either single or double quotes to prevent unwanted
+splitting,. I<re='~/dl dl$'> or I<re="~/dl dl$">. You can use "regex" rather
+than "re" to avoid having to remember the spelling and you can use "pattern"
+for consistency with C<setinpath>.
+
 =item setintag I<tags> I<option> I<value>
 
 Assigns a new value to an option, but locally for the directories that are
@@ -1850,17 +1878,7 @@ with the I<v> tag by typing I<"v>, then use this command:
 
 =item setlocal [path=I<path>] I<option> I<value>
 
-Assigns a new value to an option, but locally for the directory given by
-I<path>. This means, that this option only takes effect when visiting that
-directory. If no path is given, uses the current directory.
-
-I<path> is a regular expression.  This means that C<path=~/dl> applies to all
-paths that start with I<~/dl>, e.g. I<~/dl2> and I<~/dl/foo>. To avoid this,
-use C<path=~/dl$>.  To specify a folder with special characters
-(.^$\*+?(){}[]|), escape them with a backslash.
-
-I<path> can be quoted with either single or double quotes to prevent unwanted
-splitting. I<path='~/dl dl$'> or I<path="~/dl dl$">
+Alias for C<setinpath>.
 
 =item shell [-I<flags>] I<command>