From 1b5c7bd54ac76a3e62a28762402b4db2df5d9e2a Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Mon, 30 Mar 2015 18:54:57 +0200 Subject: new linemode with the information from file(1) --- doc/ranger.1 | 8 ++++++-- doc/ranger.pod | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 3ba4fe4e..8a1e00c1 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.6.1" "03/03/2015" "ranger manual" +.TH RANGER 1 "ranger-1.6.1" "30/03/15" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -1006,13 +1006,17 @@ Looks for a string in all marked files or directories. .IX Item "linemode linemodename" Sets the linemode of all files in the current directory. The linemode may be: .Sp -.Vb 5 +.Vb 6 \& "filename": display each line as "..." +\& "fileinfo": display each line as "..." \& "permissions": display each line as " " \& "metatitle": display metadata from .metadata.json files if \& available, fall back to the "filename" linemode if no \& metadata was found. See :meta command. .Ve +.Sp +The custom linemodes may be added by subclassing the \fILinemodeBase\fR class. +See the \fIranger.core.linemode\fR module for some examples. .IP "load_copy_buffer" 2 .IX Item "load_copy_buffer" Load the copy buffer from \fI~/.config/ranger/copy_buffer\fR. This can be used to diff --git a/doc/ranger.pod b/doc/ranger.pod index 336a886c..a6204403 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -1046,6 +1046,7 @@ Looks for a string in all marked files or directories. Sets the linemode of all files in the current directory. The linemode may be: "filename": display each line as "..." + "fileinfo": display each line as "..." "permissions": display each line as " " "metatitle": display metadata from .metadata.json files if available, fall back to the "filename" linemode if no -- cgit 1.4.1-2-gfad0 From 3c2862ea9b84d4f2e4ecd416c0db66db2dad58ba Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 9 Apr 2015 16:37:50 +0200 Subject: examples/bash_automatic_cd.sh: use mktemp This is a follow-up to #282 --- doc/examples/bash_automatic_cd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/bash_automatic_cd.sh b/doc/examples/bash_automatic_cd.sh index 8d72c553..465c9c80 100644 --- a/doc/examples/bash_automatic_cd.sh +++ b/doc/examples/bash_automatic_cd.sh @@ -8,7 +8,7 @@ # original directory. function ranger-cd { - tempfile='/tmp/chosendir' + tempfile="$(mktemp)" /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}" test -f "$tempfile" && if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then -- cgit 1.4.1-2-gfad0 From 3160c4a7ebedf85c068baa4bae6747cafc123d4b Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 10 Apr 2015 00:12:46 +0200 Subject: ranger.1: added documentation for %rangerdir and %space macros --- doc/ranger.1 | 10 +++++++++- doc/ranger.pod | 8 ++++++++ doc/rifle.1 | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 8a1e00c1..295314f4 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.6.1" "30/03/15" "ranger manual" +.TH RANGER 1 "ranger-1.6.1" "04/10/2015" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -321,6 +321,14 @@ Macros for file paths are generally shell-escaped so they can be used in the Additionally, if you create a key binding that uses , a special statement which accepts any key, then the macro \f(CW%any\fR (or \f(CW%any0\fR, \f(CW%any1\fR, \f(CW%any2\fR, ...) can be used in the command to get the key that was pressed. +.PP +The macro \f(CW%rangerdir\fR expands to the directory of ranger's python library, you +can use it for something like this command: + alias show_commands shell less \f(CW%rangerdir\fR/config/commands.py +.PP +The macro \f(CW%space\fR expands to a space character. You can use it to add spaces to +the end of a command when needed, while preventing editors to strip spaces off +the end of the line automatically. .SS "\s-1BOOKMARKS\s0" .IX Subsection "BOOKMARKS" Type \fBm\fR to bookmark the current directory. You can re-enter this diff --git a/doc/ranger.pod b/doc/ranger.pod index a6204403..ad75f35a 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -218,6 +218,14 @@ Additionally, if you create a key binding that uses , a special statement which accepts any key, then the macro %any (or %any0, %any1, %any2, ...) can be used in the command to get the key that was pressed. +The macro %rangerdir expands to the directory of ranger's python library, you +can use it for something like this command: + alias show_commands shell less %rangerdir/config/commands.py + +The macro %space expands to a space character. You can use it to add spaces to +the end of a command when needed, while preventing editors to strip spaces off +the end of the line automatically. + =head2 BOOKMARKS Type B> to bookmark the current directory. You can re-enter this diff --git a/doc/rifle.1 b/doc/rifle.1 index 999d56d6..21c53276 100644 --- a/doc/rifle.1 +++ b/doc/rifle.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RIFLE 1" -.TH RIFLE 1 "rifle-1.6.1" "08/26/2014" "rifle manual" +.TH RIFLE 1 "rifle-1.6.1" "04/10/2015" "rifle manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l -- cgit 1.4.1-2-gfad0 From 28e23ddcde292efd2968e44d2781e387cba5618f Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 13 Apr 2015 12:41:52 +0200 Subject: doc/ranger.1: added entries for :help and :setintag --- doc/ranger.1 | 12 +++++++++++- doc/ranger.pod | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 295314f4..e5400efb 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.6.1" "04/10/2015" "ranger manual" +.TH RANGER 1 "ranger-1.6.1" "04/13/2015" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -853,6 +853,7 @@ ranger. For your convenience, this is a list of the \*(L"public\*(R" commands i \& find pattern \& flat level \& grep pattern +\& help \& linemode linemodename \& load_copy_buffer \& map key command @@ -874,6 +875,7 @@ ranger. For your convenience, this is a list of the \*(L"public\*(R" commands i \& search pattern \& search_inc pattern \& set option value +\& setintag tags option value \& setlocal [path=] option value \& shell [\-FLAGS] command \& terminal @@ -1010,6 +1012,9 @@ values \-2 and less are invalid. .IP "grep \fIpattern\fR" 2 .IX Item "grep pattern" Looks for a string in all marked files or directories. +.IP "help" 2 +.IX Item "help" +Provides a quick way to view ranger documentations. .IP "linemode \fIlinemodename\fR" 2 .IX Item "linemode linemodename" Sets the linemode of all files in the current directory. The linemode may be: @@ -1157,6 +1162,11 @@ doesn't work for functions and regular expressions. Valid values are: \& list | 1,2,3,4 \& none | none .Ve +.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 +marked with \fItag\fR. This means, that this option only takes effect when +visiting that directory. .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 diff --git a/doc/ranger.pod b/doc/ranger.pod index ad75f35a..0ac79e12 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -869,6 +869,7 @@ ranger. For your convenience, this is a list of the "public" commands including find pattern flat level grep pattern + help linemode linemodename load_copy_buffer map key command @@ -890,6 +891,7 @@ ranger. For your convenience, this is a list of the "public" commands including search pattern search_inc pattern set option value + setintag tags option value setlocal [path=] option value shell [-FLAGS] command terminal @@ -1049,6 +1051,10 @@ values -2 and less are invalid. Looks for a string in all marked files or directories. +=item help + +Provides a quick way to view ranger documentations. + =item linemode I Sets the linemode of all files in the current directory. The linemode may be: @@ -1209,6 +1215,12 @@ doesn't work for functions and regular expressions. Valid values are: list | 1,2,3,4 none | none +=item setintag I I