summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2019-04-23 21:44:16 +0200
committerGitHub <noreply@github.com>2019-04-23 21:44:16 +0200
commit421adfcb70b5925d3b862da1e27204cc206b1b1e (patch)
tree3ed35503d85dd74aab00a3928591504e85d7e643
parentc7984f2f419b34a6e4767aa4df74304221b43bf3 (diff)
parent667d4d38f6b921d32b293e1735032a5709eb41d4 (diff)
downloadranger-421adfcb70b5925d3b862da1e27204cc206b1b1e.tar.gz
Merge branch 'master' into readme-copyconfig
-rw-r--r--doc/ranger.130
-rw-r--r--doc/ranger.pod4
-rw-r--r--doc/rifle.122
-rw-r--r--ranger/container/fsobject.py8
-rw-r--r--ranger/core/actions.py26
-rw-r--r--ranger/core/main.py3
-rw-r--r--ranger/gui/widgets/statusbar.py2
7 files changed, 54 insertions, 41 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 09bd94a4..32df615e 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -54,20 +54,16 @@
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.nr rF 0
-.if \n(.g .if rF .nr rF 1
-.if (\n(rF:(\n(.g==0)) \{\
-.    if \nF \{\
-.        de IX
-.        tm Index:\\$1\t\\n%\t"\\$2"
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.        if !\nF==2 \{\
-.            nr % 0
-.            nr F 2
-.        \}
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
 .    \}
 .\}
-.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
@@ -133,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.9.2" "2019-03-10" "ranger manual"
+.TH RANGER 1 "ranger-1.9.2" "2019-04-03" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -173,7 +169,7 @@ plugins, sample configuration files and some programs for integrating ranger
 with other software.  They are usually installed to
 \&\fI/usr/share/doc/ranger/examples\fR.
 .PP
-The man page of \fBrifle\fR\|(1) describes the functions of the file opener
+The man page of \fIrifle\fR\|(1) describes the functions of the file opener
 .PP
 The section \fI\s-1LINKS\s0\fR of this man page contains further resources.
 .SH "POSITIONAL ARGUMENTS"
@@ -433,8 +429,10 @@ The rules, along with further documentation, are contained in
 Flags give you a way to modify the behavior of the spawned process.  They are
 used in the commands \f(CW\*(C`:open_with\*(C'\fR (key \*(L"r\*(R") and \f(CW\*(C`:shell\*(C'\fR (key \*(L"!\*(R").
 .PP
-.Vb 4
-\& f   Fork the process.  (Run in background)
+.Vb 6
+\& f   Fork the process, i.e. run in background.  Please use this flag instead of
+\&     calling "disown" or "nohup", to avoid killing the background command when
+\&     pressing Ctrl+C in ranger.
 \& c   Run the current file only, instead of the selection
 \& r   Run application with root privilege (requires sudo)
 \& t   Run application in a new terminal window
@@ -1672,7 +1670,7 @@ copy, run:
 .Ve
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fBrifle\fR\|(1)
+\&\fIrifle\fR\|(1)
 .SH "BUGS"
 .IX Header "BUGS"
 Report bugs here: <https://github.com/ranger/ranger/issues>
diff --git a/doc/ranger.pod b/doc/ranger.pod
index e3419d0f..a89670f3 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -339,7 +339,9 @@ F<$repo/ranger/config/rifle.conf>.
 Flags give you a way to modify the behavior of the spawned process.  They are
 used in the commands C<:open_with> (key "r") and C<:shell> (key "!").
 
- f   Fork the process.  (Run in background)
+ f   Fork the process, i.e. run in background.  Please use this flag instead of
+     calling "disown" or "nohup", to avoid killing the background command when
+     pressing Ctrl+C in ranger.
  c   Run the current file only, instead of the selection
  r   Run application with root privilege (requires sudo)
  t   Run application in a new terminal window
diff --git a/doc/rifle.1 b/doc/rifle.1
index 9ed1a145..a42734d2 100644
--- a/doc/rifle.1
+++ b/doc/rifle.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -54,20 +54,16 @@
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.nr rF 0
-.if \n(.g .if rF .nr rF 1
-.if (\n(rF:(\n(.g==0)) \{\
-.    if \nF \{\
-.        de IX
-.        tm Index:\\$1\t\\n%\t"\\$2"
+.if !\nF .nr F 0
+.if \nF>0 \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.        if !\nF==2 \{\
-.            nr % 0
-.            nr F 2
-.        \}
+.    if !\nF==2 \{\
+.        nr % 0
+.        nr F 2
 .    \}
 .\}
-.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
@@ -133,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RIFLE 1"
-.TH RIFLE 1 "rifle-1.9.2" "2018-09-09" "rifle manual"
+.TH RIFLE 1 "rifle-1.9.2" "2019-04-03" "rifle manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index c5715294..f57fb451 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -31,10 +31,10 @@ CONTAINER_EXTENSIONS = ('7z', 'ace', 'ar', 'arc', 'bz', 'bz2', 'cab', 'cpio',
                         'cpt', 'deb', 'dgc', 'dmg', 'gz', 'iso', 'jar', 'msi',
                         'pkg', 'rar', 'shar', 'tar', 'tbz', 'tgz', 'txz',
                         'xar', 'xpi', 'xz', 'zip')
-DOCUMENT_EXTENSIONS = ('cfg', 'css', 'cvs', 'djvu', 'doc', 'docx', 'gnm',
-                       'gnumeric', 'htm', 'html', 'md', 'odf', 'odg', 'odp',
-                       'ods', 'odt', 'pdf', 'pod', 'ps', 'rtf', 'sxc', 'txt',
-                       'xls', 'xlw', 'xml', 'xslx')
+DOCUMENT_EXTENSIONS = ('cbr', 'cbz', 'cfg', 'css', 'cvs', 'djvu', 'doc',
+                       'docx', 'gnm', 'gnumeric', 'htm', 'html', 'md', 'odf',
+                       'odg', 'odp', 'ods', 'odt', 'pdf', 'pod', 'ps', 'rtf',
+                       'sxc', 'txt', 'xls', 'xlw', 'xml', 'xslx')
 DOCUMENT_BASENAMES = ('bugs', 'bugs', 'changelog', 'copying', 'credits',
                       'hacking', 'help', 'install', 'license', 'readme', 'todo')
 
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 75697696..e7be0c65 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -521,6 +521,8 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
                 selection = self.thistab.get_selection()
             else:
                 selection = [tfile]
+            if tfile is None:
+                return
             if tfile.is_directory:
                 self.thistab.enter_dir(tfile)
             elif selection:
@@ -870,10 +872,16 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
     # Tags are saved in ~/.config/ranger/tagged and simply mark if a
     # file is important to you in any context.
 
-    def tag_toggle(self, paths=None, value=None, movedown=None, tag=None):
+    def tag_toggle(self, tag=None, paths=None, value=None, movedown=None):
         """:tag_toggle <character>
 
         Toggle a tag <character>.
+
+        Keyword arguments:
+            tag=<character>
+            paths=<paths to tag>
+            value=<True: add/False: remove/anything else: toggle>
+            movedown=<boolean>
         """
         if not self.tags:
             return
@@ -895,11 +903,19 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
 
         self.ui.redraw_main_column()
 
-    def tag_remove(self, paths=None, movedown=None, tag=None):
-        self.tag_toggle(paths=paths, value=False, movedown=movedown, tag=tag)
+    def tag_remove(self, tag=None, paths=None, movedown=None):
+        """:tag_remove <character>
+
+        Remove a tag <character>. See :tag_toggle for keyword arguments.
+        """
+        self.tag_toggle(tag=tag, paths=paths, value=False, movedown=movedown)
+
+    def tag_add(self, tag=None, paths=None, movedown=None):
+        """:tag_add <character>
 
-    def tag_add(self, paths=None, movedown=None, tag=None):
-        self.tag_toggle(paths=paths, value=True, movedown=movedown, tag=tag)
+        Add a tag <character>. See :tag_toggle for keyword arguments.
+        """
+        self.tag_toggle(tag=tag, paths=paths, value=True, movedown=movedown)
 
     # --------------------------
     # -- Bookmarks
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 6fdd5366..23648677 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -105,7 +105,8 @@ def main(
         if not os.access(path_abs, os.F_OK):
             paths_inaccessible += [path]
     if paths_inaccessible:
-        print('Inaccessible paths: {0}'.format(paths), file=sys.stderr)
+        print('Inaccessible paths: {0}'.format(', '.join(paths_inaccessible)),
+              file=sys.stderr)
         return 1
 
     profile = None
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index f068bc7e..71064ed4 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -281,7 +281,7 @@ class StatusBar(Widget):  # pylint: disable=too-many-instance-attributes
             right.add(human_readable(target.disk_usage, separator='') + " sum")
             if self.settings.display_free_space_in_status_bar:
                 try:
-                    free = get_free_space(target.mount_path)
+                    free = get_free_space(target.path)
                 except OSError:
                     pass
                 else: