rtfm-filemanager 1.8.4 → 1.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rtfm +21 -18
- 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: e7b24f15e8af4deff5b71206bffb91a9ae3bcfb23b5e824a17fc27cd355f79e9
|
4
|
+
data.tar.gz: 619ee0583a9df68125aea192843df1a6179c79dffc07f1d34d1bb2c3d3541565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af7ba0a02a1c148bfdef3b18ba00493105cdc3e8ab1f93189689d7257d5ed40f9d9063cb9f1d0a6d01a34daffb7203825cd983d0c20ee6af79cacfbe2975869
|
7
|
+
data.tar.gz: 87fb16143badb66e1dec1a6443c961bf912fdaa0ea0385329d49a0c52403d9ce11dba0a45067f956bb07b5ab5ab4b57ed5f58cd6874bb755d33494d3a7546d23
|
data/bin/rtfm
CHANGED
@@ -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
|
@@ -1312,13 +1314,14 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
|
|
1312
1314
|
return
|
1313
1315
|
end
|
1314
1316
|
begin
|
1315
|
-
status = Timeout::timeout(
|
1317
|
+
status = Timeout::timeout(15) {
|
1316
1318
|
@w_r.clr
|
1317
1319
|
begin
|
1318
|
-
@w_r.pager_cmd = "#{cmd} | #{bat} -n --color=always 2>/dev/null"
|
1320
|
+
@w_r.pager_cmd = "#{cmd} | #{@bat} -n --color=always 2>/dev/null"
|
1319
1321
|
@w_r.text = `#{@w_r.pager_cmd} 2>/dev/null`
|
1320
1322
|
rescue
|
1321
|
-
@w_r.
|
1323
|
+
@w_r.pager_cmd = "#{cmd} 2>/dev/null"
|
1324
|
+
@w_r.text = `#{@w_r.pager_cmd} 2>/dev/null`
|
1322
1325
|
end
|
1323
1326
|
unless @w_r.text == "" or @w_r.text == nil
|
1324
1327
|
pager_start
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 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.8: Fixed color parsing for Kitty and other terminals.'
|
37
37
|
email: g@isene.com
|
38
38
|
executables:
|
39
39
|
- rtfm
|