about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index d7a564c2..16bc8133 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -28,6 +28,7 @@ from ranger.core.loader import CommandLoader, CopyLoader
 from ranger.core.shared import FileManagerAware, SettingsAware
 from ranger.core.tab import Tab
 from ranger.ext.direction import Direction
+from ranger.ext.get_executables import get_executables
 from ranger.ext.keybinding_parser import key_to_string, construct_keybinding
 from ranger.ext.macrodict import MacroDict, MACRO_FAIL, macro_val
 from ranger.ext.next_available_filename import next_available_filename
@@ -968,17 +969,18 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         pager.set_source(lines)
 
     def display_help(self):
-        manualpath = self.relpath('../doc/ranger.1')
-        if os.path.exists(manualpath):
-            process = self.run(['man', manualpath])
-            if process.poll() != 16:
-                return
-        process = self.run(['man', 'ranger'])
-        if process is None:
-            self.notify("Failed to show man page, check if man is installed", bad=True)
-            return
-        if process.poll() == 16:
-            self.notify("Could not find manpage.", bad=True)
+        if 'man' in get_executables():
+            manualpath = self.relpath('../doc/ranger.1')
+            if os.path.exists(manualpath):
+                process = self.run(['man', manualpath])
+                if process.poll() != 16:
+                    return
+            process = self.run(['man', 'ranger'])
+            if process.poll() == 16:
+                self.notify("Could not find manpage.", bad=True)
+        else:
+            self.notify("Failed to show man page, check if man is installed",
+                        bad=True)
 
     def display_log(self):
         logs = list(self.get_log())
kartik/mu/blame/html/apps/factorial3.subx.html?h=hlt&id=d9f8784d4c73a257205f040eeb31414814db56f8'>^
3350c34a ^

c83dca9c ^
d3a9db3a ^
480fd995 ^
c83dca9c ^
c83dca9c ^
































3350c34a ^
c83dca9c ^


c8998b51 ^




a8fb537a ^
3350c34a ^
c8998b51 ^




3350c34a ^
c8998b51 ^


480fd995 ^
a8fb537a ^
c83dca9c ^
480fd995 ^

3d1c4216 ^
480fd995 ^



3d1c4216 ^
480fd995 ^



3d1c4216 ^















3350c34a ^
3d1c4216 ^






3350c34a ^
3d1c4216 ^









3350c34a ^
3d1c4216 ^




3350c34a ^
3d1c4216 ^



3350c34a ^
c83dca9c ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142