rtfm-filemanager 1.8.7 → 1.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rtfm +22 -19
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68490b5cd46869950b3f9af475c71b52f2e67177fb688b879b4e6664c8d1eaf2
|
4
|
+
data.tar.gz: 8bb68fe605e8bebaea92207dfd7c65fc8060ae20328fc24ec40c2d8b0be9d659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9cec1bac2d79cee41b9015fe3d57275c1b9cd72311cf7c319855e24be7165758b18abb0ff2d7d81faab5575a66d11bae9e1765e1bbc9cb63abd509b7bb06080
|
7
|
+
data.tar.gz: e9ef297793c450fb2a5b030bd8186c35503d710d9925c0e9060f4b11d11053d1e28cb90e063a35392224def18eda19c3532e3802d08ef6d0e098b3a165c100bb
|
data/bin/rtfm
CHANGED
@@ -69,7 +69,7 @@ MANIPULATE ITEMS
|
|
69
69
|
|
70
70
|
DIRECTORY VIEWS
|
71
71
|
a = Show all (also hidden) items
|
72
|
-
|
72
|
+
A = Show long info per item (show item attributes)
|
73
73
|
o = Change the order/sorting of directories (circular toggle)
|
74
74
|
i = Invert/reverse the sorting
|
75
75
|
O = Show the Ordering in the bottom window (the full ls command)
|
@@ -137,7 +137,7 @@ begin # BASIC SETUP
|
|
137
137
|
end
|
138
138
|
|
139
139
|
if cmd?('/usr/lib/w3m/w3mimgdisplay')
|
140
|
-
@
|
140
|
+
@imgdisplay = "/usr/lib/w3m/w3mimgdisplay"
|
141
141
|
@showimage = true
|
142
142
|
else
|
143
143
|
@showimage = false
|
@@ -234,9 +234,26 @@ def get_ls_color(type) # GET THE COLOR FOR THE FILETYPE FROM IMPORTED LS_COLORS
|
|
234
234
|
end
|
235
235
|
return color.to_i, bold
|
236
236
|
end
|
237
|
+
def syntax_highlight(input) # SYNTAX HIGHLIGHTING FROM ANSI COLOR CODES
|
238
|
+
color_ary = color_parse(input)
|
239
|
+
color_ary.each do | pair |
|
240
|
+
begin
|
241
|
+
fg = pair[0].to_i
|
242
|
+
atr = pair[1].to_i
|
243
|
+
atr == 1 ? atr = Curses::A_BOLD : atr = 0
|
244
|
+
text = pair[2]
|
245
|
+
text.gsub!(/\t/, '')
|
246
|
+
init_pair(fg, fg, 0)
|
247
|
+
@w_r.attron(color_pair(fg) | atr) { @w_r << text }
|
248
|
+
rescue
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
237
252
|
def color_parse(input) # PARSE ANSI COLOR SEQUENCES
|
238
253
|
input.gsub!( /\e\[\d;38;5;(\d+);*(\d*)m/, '¤¤\1¤¤\2¤¤')
|
239
254
|
input.gsub!( /\e\[38;5;(\d+);*(\d*)m/, '¤¤\1¤¤\2¤¤')
|
255
|
+
input.gsub!( /\e\[\d;38;2;(\d+);*(\d*);\d*m/, '¤¤\1¤¤\2¤¤')
|
256
|
+
input.gsub!( /\e\[38;2;(\d+);*(\d*);\d*m/, '¤¤\1¤¤\2¤¤')
|
240
257
|
input.gsub!( /\e\[0m/, "\t")
|
241
258
|
color_array = input.split("¤¤")
|
242
259
|
color_array = color_array.drop(1)
|
@@ -1071,21 +1088,6 @@ def tagged_info # SHOW THE LIST OF TAGGED ITEMS IN @w_r
|
|
1071
1088
|
@tagged.empty? ? info += "(None)" : info += @tagged.join("\n")
|
1072
1089
|
w_r_info(info)
|
1073
1090
|
end
|
1074
|
-
def syntax_highlight(input) # SYNTAX HIGHLIGHTING FROM ANSI COLOR CODES
|
1075
|
-
color_ary = color_parse(input)
|
1076
|
-
color_ary.each do | pair |
|
1077
|
-
begin
|
1078
|
-
fg = pair[0].to_i
|
1079
|
-
atr = pair[1].to_i
|
1080
|
-
atr == 1 ? atr = Curses::A_BOLD : atr = 0
|
1081
|
-
text = pair[2]
|
1082
|
-
text.gsub!(/\t/, '')
|
1083
|
-
init_pair(fg, fg, 0)
|
1084
|
-
@w_r.attron(color_pair(fg) | atr) { @w_r << text }
|
1085
|
-
rescue
|
1086
|
-
end
|
1087
|
-
end
|
1088
|
-
end
|
1089
1091
|
def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
1090
1092
|
# Pass "clear" to clear the window for previous image
|
1091
1093
|
return unless @showimage
|
@@ -1100,10 +1102,11 @@ def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
|
1100
1102
|
img_max_w = char_w * (Curses.cols - Curses.cols/@width - 2)
|
1101
1103
|
img_max_h = char_h * (Curses.lines - 4)
|
1102
1104
|
if image == "clear"
|
1105
|
+
`clear`
|
1103
1106
|
img_x -= char_w
|
1104
1107
|
img_max_w += char_w + 2
|
1105
1108
|
img_max_h += 2
|
1106
|
-
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@
|
1109
|
+
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
1107
1110
|
else
|
1108
1111
|
img_w,img_h = `identify -format "%[fx:w]x%[fx:h]" #{image} 2>/dev/null`.split('x')
|
1109
1112
|
img_w = img_w.to_i
|
@@ -1116,7 +1119,7 @@ def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
|
1116
1119
|
img_w = img_w * img_max_h / img_h
|
1117
1120
|
img_h = img_max_h
|
1118
1121
|
end
|
1119
|
-
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{image}\"\n4;\n3;" | #{@
|
1122
|
+
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{image}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
1120
1123
|
end
|
1121
1124
|
rescue
|
1122
1125
|
@w_r.clr
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtfm-filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
description: 'A full featured terminal browser with syntax highlighted files, images
|
34
34
|
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
35
35
|
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
36
|
-
other features. New in 1.8.
|
36
|
+
other features. New in 1.8.10: Fixed ''l'' -> ''A'' in the help text'
|
37
37
|
email: g@isene.com
|
38
38
|
executables:
|
39
39
|
- rtfm
|