rtfm-filemanager 3.11 → 3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/rtfm +53 -40
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbfb6d5c3e1963f33faa992f302ea07e11e8ead272799293958a4060b2c293a5
|
|
4
|
+
data.tar.gz: 13c4c9097507dd2bd73d98a75cf8e85fc72eaad7494aec8fe8ed9b9bf0069a03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cbd027f69aa06ab38750d352872d26670eb559cbf5c09c0221e00a40b492faa5a19db10b81858c088dbcd2efa39b1c7047c7670456d60492f4c4ee624968f7f3
|
|
7
|
+
data.tar.gz: 2702fad4c85c61f986d96d932505217ae05cc8a407649d9acb0494793ccc85e0ef896ad06dabd75cbda2b364e51ea87043ed6ded48abceb271de053a9faa6614
|
data/bin/rtfm
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# for any damages resulting from its use. Further, I am under no
|
|
15
15
|
# obligation to maintain or extend this software. It is provided
|
|
16
16
|
# on an 'as is' basis without any expressed or implied warranty.
|
|
17
|
-
@version = "3.
|
|
17
|
+
@version = "3.12"
|
|
18
18
|
|
|
19
19
|
# PRELIMINARIES
|
|
20
20
|
@help = <<HELPTEXT
|
|
@@ -211,42 +211,43 @@ begin # BASIC SETUP
|
|
|
211
211
|
|
|
212
212
|
# INITIALIZE VARIABLES
|
|
213
213
|
## These can be set by user in .rtfm.conf
|
|
214
|
-
@lsbase
|
|
215
|
-
@lslong
|
|
216
|
-
@lsall
|
|
217
|
-
@lsorder
|
|
218
|
-
@lsinvert
|
|
219
|
-
@lsuser
|
|
220
|
-
@width
|
|
221
|
-
@history
|
|
222
|
-
@
|
|
223
|
-
@
|
|
224
|
-
@
|
|
225
|
-
@
|
|
214
|
+
@lsbase = "--group-directories-first" # Basic ls setup
|
|
215
|
+
@lslong = false # Set short form ls (toggled by pressing "l")
|
|
216
|
+
@lsall = "" # Set "ls -a" to false (toggled by pressing "a" - sets it to "-a")
|
|
217
|
+
@lsorder = "" # Change the order/sorting by pressing 'o' (circular toggle)
|
|
218
|
+
@lsinvert = "" # Set to "-r" to reverse/invert sorting order
|
|
219
|
+
@lsuser = "" # Set this variable in .rtfm.conf to any 'ls' switch you want to customize directory listings
|
|
220
|
+
@width = 4 # Set width of the left pane to the default ⅓ of the terminal width
|
|
221
|
+
@history = [] # Initialize the command line history array
|
|
222
|
+
@rubyhistory = [] # Initialize the command line history array for ruby commands
|
|
223
|
+
@border = false
|
|
224
|
+
@preview = true
|
|
225
|
+
@runmailcap = false # Set to 'true' in .rtfm.conf if you want to use run-mailcap instead of xdg-open
|
|
226
|
+
@batuse = true # Use batcat for syntax highlighting
|
|
226
227
|
## These are automatically written on exit
|
|
227
|
-
@marks
|
|
228
|
-
@hash
|
|
229
|
-
@tagged
|
|
228
|
+
@marks = {} # Initialize (book)marks hash
|
|
229
|
+
@hash = {} # Initialize the sha directory hashing
|
|
230
|
+
@tagged = [] # Initialize the tagged array - for collecting all tagged items
|
|
230
231
|
## These should not be set by user in .rtfm.conf
|
|
231
|
-
@directory
|
|
232
|
-
@searched
|
|
233
|
-
@lsfiles
|
|
234
|
-
@lsmatch
|
|
235
|
-
@index
|
|
236
|
-
@cont
|
|
237
|
-
@tagsize
|
|
238
|
-
@navi
|
|
239
|
-
@marks["'"]
|
|
232
|
+
@directory = {} # Initialize the directory hash for remembering directories visited
|
|
233
|
+
@searched = "" # Initialize the active searched for items
|
|
234
|
+
@lsfiles = "" # File types to show (initially set to all file types) - not saved on exit
|
|
235
|
+
@lsmatch = "" # Files to match (initially set to matching all files) - not saved on exit
|
|
236
|
+
@index = 0 # Set chosen item to first on startup
|
|
237
|
+
@cont = ""
|
|
238
|
+
@tagsize = 0
|
|
239
|
+
@navi = ""
|
|
240
|
+
@marks["'"] = Dir.pwd
|
|
240
241
|
## File type recognizers
|
|
241
|
-
@imagefile
|
|
242
|
-
@pptfile
|
|
243
|
-
@xlsfile
|
|
244
|
-
@docfile
|
|
245
|
-
@docxfile
|
|
246
|
-
@xlsxfile
|
|
247
|
-
@pptxfile
|
|
248
|
-
@oolofile
|
|
249
|
-
@pdffile
|
|
242
|
+
@imagefile = /\.jpg$|\.JPG$|\.jpeg$|\.png$|\.bmp$|\.gif$|\.tif$|\.tiff$/
|
|
243
|
+
@pptfile = /\.ppt$/
|
|
244
|
+
@xlsfile = /\.xls$/
|
|
245
|
+
@docfile = /\.doc$/
|
|
246
|
+
@docxfile = /\.docx$/
|
|
247
|
+
@xlsxfile = /\.xlsx$/
|
|
248
|
+
@pptxfile = /\.pptx$/
|
|
249
|
+
@oolofile = /\.odt$|\.odc$|\.odp$|\.odg$/
|
|
250
|
+
@pdffile = /\.pdf$|\.ps$/
|
|
250
251
|
## Get variables from config file (written back to .rtf.conf upon exit via 'q')
|
|
251
252
|
if File.exist?(Dir.home+'/.rtfm.conf')
|
|
252
253
|
load(Dir.home+'/.rtfm.conf')
|
|
@@ -876,7 +877,7 @@ def main_getkey # GET KEY FROM USER
|
|
|
876
877
|
@break = true
|
|
877
878
|
when '@' # Enter "Ruby debug"
|
|
878
879
|
@w_b.nohistory = false
|
|
879
|
-
cmd = w_b_getstr("◆ ", "")
|
|
880
|
+
cmd = w_b_getstr("◆ ", "", true)
|
|
880
881
|
@w_b.clr
|
|
881
882
|
@w_b.refresh
|
|
882
883
|
@w_b.update = true
|
|
@@ -912,6 +913,10 @@ def conf_write
|
|
|
912
913
|
conf += "@hash = #{@hash}\n"
|
|
913
914
|
conf.sub!(/^@tagged.*\[.*\]\n/, "")
|
|
914
915
|
conf += "@tagged = #{@tagged}\n"
|
|
916
|
+
conf.sub!(/^@history.*\[.*\]\n/, "")
|
|
917
|
+
conf += "@history = #{@history}\n"
|
|
918
|
+
conf.sub!(/^@rubyhistory.*\[.*\]\n/, "")
|
|
919
|
+
conf += "@rubyhistory = #{@rubyhistory}\n"
|
|
915
920
|
if @write_conf_all
|
|
916
921
|
conf.sub!(/^@lslong.*\n/, "")
|
|
917
922
|
conf += "@lslong = #{@lslong}\n"
|
|
@@ -1426,14 +1431,19 @@ def w_b_info(info) # SHOW INFO IN @W_B
|
|
|
1426
1431
|
@w_b.write
|
|
1427
1432
|
@w_b.update = false
|
|
1428
1433
|
end
|
|
1429
|
-
def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1434
|
+
def w_b_getstr(pretext, text, ruby=false) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1430
1435
|
Curses.curs_set(1)
|
|
1431
1436
|
Curses.echo
|
|
1432
1437
|
stk = 0
|
|
1433
|
-
@history.insert(stk, text)
|
|
1434
|
-
pos = @history[stk].length
|
|
1435
1438
|
chr = ""
|
|
1436
|
-
|
|
1439
|
+
if ruby
|
|
1440
|
+
@rubyhistory.insert(stk, text)
|
|
1441
|
+
@history_copy = @rubyhistory.map(&:clone)
|
|
1442
|
+
else
|
|
1443
|
+
@history.insert(stk, text)
|
|
1444
|
+
@history_copy = @history.map(&:clone)
|
|
1445
|
+
end
|
|
1446
|
+
pos = @history_copy[stk].length
|
|
1437
1447
|
while chr != "ENTER"
|
|
1438
1448
|
@w_b.setpos(0,0)
|
|
1439
1449
|
init_pair(250, 250, 238)
|
|
@@ -1544,11 +1554,14 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
|
1544
1554
|
end
|
|
1545
1555
|
curstr = @history_copy[stk]
|
|
1546
1556
|
@history_copy.shift if @w_b.nohistory
|
|
1547
|
-
@history.insert(0, @history_copy[stk])
|
|
1557
|
+
ruby ? @rubyhistory.insert(0, @history_copy[stk]) : @history.insert(0, @history_copy[stk])
|
|
1548
1558
|
unless @w_b.nohistory
|
|
1549
1559
|
@history.uniq!
|
|
1550
1560
|
@history.compact!
|
|
1551
1561
|
@history.delete("")
|
|
1562
|
+
@rubyhistory.uniq!
|
|
1563
|
+
@rubyhistory.compact!
|
|
1564
|
+
@rubyhistory.delete("")
|
|
1552
1565
|
end
|
|
1553
1566
|
Curses.curs_set(0)
|
|
1554
1567
|
Curses.noecho
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rtfm-filemanager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '3.
|
|
4
|
+
version: '3.12'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Geir Isene
|
|
@@ -47,7 +47,8 @@ dependencies:
|
|
|
47
47
|
description: 'A full featured terminal browser with syntax highlighted files, images
|
|
48
48
|
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
|
49
49
|
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
|
50
|
-
other features. New in 3.
|
|
50
|
+
other features. New in 3.12: Ruby commands gets its own history. Histories are now
|
|
51
|
+
saved/restored.'
|
|
51
52
|
email: g@isene.com
|
|
52
53
|
executables:
|
|
53
54
|
- rtfm
|