rtfm-filemanager 1.7.3 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +22 -12
  3. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3783b49d04b0ff909d2a28bb622c019921bffc2af20bbe19d8ef06d1bec567f7
4
- data.tar.gz: 4beae68faee067a137d89022b322aa2bc96a8d3d6acf1ce50ad5bace8d98ba72
3
+ metadata.gz: 04d197c6aa33f350419d15ec6fdb9b380062a9811a5fcff79612f0f551011bdd
4
+ data.tar.gz: 2b7054f5603f874f962fc9613e4bf971aa33b54d1ca7a530f69e2ff2dab96b85
5
5
  SHA512:
6
- metadata.gz: 88b30836be23ebcbfff703b21c550bf855c21a8f127ed8bd0f65b4d3e10bcfbf1a1fdc3559d58240e70496d5d9c3ea599eaededa0d6792ad5db3fefd87d715c7
7
- data.tar.gz: afdd31852da552fc5b923efe8173d6d7d665d67a16aaa7715b02015f6acb3301d62e43d318f0a310b9b19d445f5076ef9aec396963bc4fcc0114c4666fcaadc0
6
+ metadata.gz: 384b81bcd318651c396aa2a7a494f83bfe2f5ce005d0b3e45d4de815ebfc76dd95a3af989865edf0ca19010edcfaa577e70f62a72e8d83e7c84a53e16a963bbd
7
+ data.tar.gz: b62bc3a32ae1d474cde2d9e35a3d0316779d9a527fbd8f4148a42c3cb316d3ae41413ec255f12e5d31f378a64fd1d80ce208a99418a3b0d93dd42ffc8ecd7dc0
data/bin/rtfm CHANGED
@@ -46,6 +46,7 @@ JUMPING AND MARKS
46
46
  Press '-' and a letter to delete that mark
47
47
  M = Show marked items in right pane
48
48
  ' = Jump to mark (next letter is the name of the mark [a-zA-Z'])
49
+ The 5 latest directories visited are stored in marks 1-5 (1 being the very latest)
49
50
  / = Enter search string in bottom window to highlight matching items and jump to the first match
50
51
  n = Jump to the next item matched by '/'
51
52
  N = Jump to the previous item matched by '/'
@@ -315,7 +316,7 @@ def main_getkey # GET KEY FROM USER
315
316
  var_resets
316
317
  cur_dir = Dir.pwd
317
318
  @directory[Dir.pwd] = @selected # Store this directory before leaving
318
- @marks["'"] = Dir.pwd
319
+ mark_latest
319
320
  Dir.chdir("..")
320
321
  @directory[Dir.pwd] = File.basename(cur_dir) unless @directory.key?(Dir.pwd)
321
322
  @w_r.update = true
@@ -323,14 +324,14 @@ def main_getkey # GET KEY FROM USER
323
324
  when 'RIGHT', 'l'
324
325
  var_resets
325
326
  @directory[Dir.pwd] = @selected # Store this directory before leaving
326
- @marks["'"] = Dir.pwd
327
+ mark_latest
327
328
  open_selected()
328
329
  @w_r.update = true
329
330
  @w_b.update = true
330
331
  when 'x' # Force open with file opener (used to open HTML files in browser)
331
332
  var_resets
332
333
  @directory[Dir.pwd] = @selected # Store this directory before leaving
333
- @marks["'"] = Dir.pwd
334
+ mark_latest
334
335
  open_selected(true)
335
336
  @w_r.update = true
336
337
  @w_b.update = true
@@ -370,14 +371,12 @@ def main_getkey # GET KEY FROM USER
370
371
  @w_r.update = false
371
372
  @w_b.update = true
372
373
  when 'M' # Show marks
373
- @marks = @marks.sort.to_h
374
- @w_r.fg = 147
375
374
  marks_info
376
375
  @w_r.update = false
377
376
  @w_b.update = true
378
377
  when "'" # Jump to mark
379
378
  marks_info
380
- m = STDIN.getc
379
+ m = stdscr.getch.to_s
381
380
  if m.match(/[\w']/) and @marks[m]
382
381
  var_resets
383
382
  @directory[Dir.pwd] = @selected # Store this directory before leaving
@@ -387,6 +386,7 @@ def main_getkey # GET KEY FROM USER
387
386
  rescue
388
387
  w_b_info(" No such directory")
389
388
  end
389
+ mark_latest
390
390
  @marks["'"] = dir_before
391
391
  end
392
392
  @w_r.update = true
@@ -394,13 +394,13 @@ def main_getkey # GET KEY FROM USER
394
394
  when '~' # Go to home dir
395
395
  var_resets
396
396
  @directory[Dir.pwd] = @selected # Store this directory before leaving
397
- @marks["'"] = Dir.pwd
397
+ mark_latest
398
398
  Dir.chdir
399
399
  @w_r.update = true
400
400
  @w_b.update = true
401
401
  when 'f' # Follow symlink
402
402
  @directory[Dir.pwd] = @selected # Store this directory before leaving
403
- @marks["'"] = Dir.pwd
403
+ mark_latest
404
404
  if File.symlink?(@selected)
405
405
  begin
406
406
  Dir.chdir(File.dirname(File.readlink(@selected)))
@@ -426,7 +426,7 @@ def main_getkey # GET KEY FROM USER
426
426
  jumpdir = File.dirname(jumpdir)
427
427
  end
428
428
  @directory[Dir.pwd] = @selected # Store this directory before leaving
429
- @marks["'"] = Dir.pwd
429
+ mark_latest
430
430
  Dir.chdir(jumpdir)
431
431
  @w_r.pager = 0
432
432
  end
@@ -594,8 +594,8 @@ def main_getkey # GET KEY FROM USER
594
594
  text += [[195, 0, ps]]
595
595
  disk = `df -H | head -8`
596
596
  text += [[172, 0, disk]]
597
- dmesg = "\nDMESG:\n"
598
- dmesg += `dmesg | tail -6`
597
+ dmesg = "\nDMESG (latest first):\n"
598
+ dmesg += `dmesg | tail -6`.split("\n").sort.reverse.join("\n")
599
599
  text += [[219, 0, dmesg]]
600
600
  w_r_info(ansifix(text))
601
601
  rescue
@@ -766,6 +766,14 @@ def ansifix(text) # Format [[fg, attr, text]]
766
766
  end
767
767
  return output
768
768
  end
769
+ def mark_latest
770
+ @marks["5"] = @marks["4"]
771
+ @marks["4"] = @marks["3"]
772
+ @marks["3"] = @marks["2"]
773
+ @marks["2"] = @marks["1"]
774
+ @marks["1"] = @marks["'"]
775
+ @marks["'"] = Dir.pwd
776
+ end
769
777
  # TOP WINDOW FUNCTIONS
770
778
  def w_t_info # SHOW INFO IN @w_t
771
779
  text = " " + ENV['USER'].to_s + "@" + `hostname 2>/dev/null`.to_s.chop + ": " + Dir.pwd + "/"
@@ -887,7 +895,7 @@ end
887
895
  def open_selected(html = nil) # OPEN SELECTED ITEM (when pressing RIGHT)
888
896
  if File.directory?(@selected) # Rescue for permission error
889
897
  begin
890
- @marks["'"] = Dir.pwd
898
+ mark_latest
891
899
  Dir.chdir(@selected)
892
900
  rescue
893
901
  end
@@ -1036,6 +1044,8 @@ def w_r_info(info) # SHOW INFO IN THE RIGHT WINDOW
1036
1044
  @w_r.update = false
1037
1045
  end
1038
1046
  def marks_info # SHOW MARKS IN RIGHT WINDOW
1047
+ @w_r.fg = 183
1048
+ @marks = @marks.sort.to_h
1039
1049
  info = "MARKS:\n"
1040
1050
  unless @marks.empty?
1041
1051
  @marks.each do |mark, dir|
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.7.3
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -33,8 +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.7.3: Added feedback messages on copy/move/symink & cd to
37
- home dir = ''~'''
36
+ other features. New in 1.8.2: Reversed dmesg list in system overview (''S'')'
38
37
  email: g@isene.com
39
38
  executables:
40
39
  - rtfm