rtfm-filemanager 1.5.0 → 1.5.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +33 -7
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8981f5f29cc24ff888f70b1792a5abf8cfb8f50ed13af3c2f7982b72c4f9cef8
4
- data.tar.gz: 4284525dc3e44a0e8fbb9d25f7e63089d229c33610845c9d58cc2b28f80c1cc5
3
+ metadata.gz: b429fe89ffca3ad31171312be68f9db1a1c43f821d8a8faa7624e805eab8a06d
4
+ data.tar.gz: dba591810bea3426ee863f062cea05c7ed43c07fa83b7c5087d265b3f123aba3
5
5
  SHA512:
6
- metadata.gz: 4b30796732dfbfafdf7ac17900b67f98cb596f0ac9cb2724eb45fdf26a6b3040d1c05e741d3e93a2e02f756566cb197474a82d856db34e6d10f37a022a34b84b
7
- data.tar.gz: 4d1780ff6d665a0ca585a6c248e65734fd716116f41df886b961fa01796362075a79dea786d4807fd385ea8913d081a4fafc735e2e60c6b24a7cc835aa9f8dbe
6
+ metadata.gz: 03d0872a3dd61f96f20f777ce8337b06ebef31d5d4fb99fd83bc51f38dec9689a862d7eadb66deefd931b5e348b26f5f0d335bd567965ce9922467be72e4a5ab
7
+ data.tar.gz: 79fd8c6618c222c9365caf005a84a5363c635c8370634efa789efaa89a526603d55b8816e55a9eec80cc4fc172d669a0d8c3f84dc9537b2759570c5c88f2e5aa
data/bin/rtfm CHANGED
@@ -48,6 +48,7 @@ JUMPING AND MARKS
48
48
  ' = Jump to mark (next letter is the name of the mark [a-zA-Z'])
49
49
  / = Enter search string in bottom window to highlight matching items and jump to the first match
50
50
  n = Jump to the next item matched by '/'
51
+ N = Jump to the previous item matched by '/'
51
52
  h = Jump to Home directory
52
53
  f = Follow symlink to the directory where the target resides
53
54
  L = Start 'locate' search for files, then use '#' to jump to desired line/directory
@@ -631,7 +632,21 @@ def main_getkey # GET KEY FROM USER
631
632
  l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
632
633
  m = l.each_index.select{|n| l[n] =~ /#{@searched}/}
633
634
  i = m.find { |n| n > @index }
634
- @index = i if i > @index unless i == nil
635
+ if i == nil
636
+ @index = m.first
637
+ else
638
+ @index = i
639
+ end
640
+ @w_r.update = true
641
+ when 'N'
642
+ l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
643
+ m = l.each_index.select{|n| l[n] =~ /#{@searched}/}.reverse
644
+ i = m.find { |n| n < @index }
645
+ if i == nil
646
+ @index = m.first
647
+ else
648
+ @index = i
649
+ end
635
650
  @w_r.update = true
636
651
  when ':' # Enter "command mode" in the bottom window - tries to execute the given command
637
652
  @w_r.nohistory = false
@@ -657,14 +672,17 @@ def main_getkey # GET KEY FROM USER
657
672
  when '@' # Enter "Ruby debug"
658
673
  @w_b.nohistory = true
659
674
  cmd = w_b_getstr("◆ ", "")
675
+ @w_b.clr
676
+ @w_b.refresh
677
+ @w_b.update = true
660
678
  @w_r.clr
661
- @w_r << "Command: #{cmd}\n\n"
662
- @w_r.refresh
679
+ info = "Command: #{cmd}\n\n"
663
680
  begin
664
- eval(cmd)
681
+ info += eval(cmd).to_s
665
682
  rescue StandardError => e
666
- w_r_info("Error: #{e.inspect}")
683
+ info += "Error: #{e.inspect}"
667
684
  end
685
+ w_r_info(info)
668
686
  @w_r.update = false
669
687
  end
670
688
  if @w_r.update == true
@@ -978,12 +996,19 @@ def w_r_doc # GET FULL CONTENT TO PAGE
978
996
  @w_r << @w_r.text
979
997
  end
980
998
  def w_r_info(info) # SHOW INFO IN THE RIGHT WINDOW
999
+ image_show("clear") if @image; @image = false
1000
+ @w_r.clr
1001
+ @w_r. refresh
1002
+ w_r_width = Curses.cols - (Curses.cols/@width) - 1
1003
+ info = info.split("\n")
1004
+ l = []
1005
+ info.each{ |e| l << e.scan(/.{,#{w_r_width}}/)[0..-2] }
1006
+ info = l.join("\n")
981
1007
  @w_r.text = info
982
1008
  @w_r.pager_cmd = ""
983
1009
  pager_start
984
1010
  pager_show
985
1011
  @w_r.update = false
986
- image_show("clear") if @image; @image = false
987
1012
  end
988
1013
  def marks_info # SHOW MARKS IN RIGHT WINDOW
989
1014
  info = "MARKS:\n"
@@ -1243,6 +1268,7 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
1243
1268
  end
1244
1269
  begin
1245
1270
  status = Timeout::timeout(5) {
1271
+ @w_r.clr
1246
1272
  begin
1247
1273
  @w_r.pager_cmd = "#{cmd} | batcat -n --color=always 2>/dev/null"
1248
1274
  @w_r.text = `#{@w_r.pager_cmd} 2>/dev/null`
@@ -1347,8 +1373,8 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
1347
1373
  @tag = false # Clear tag pattern
1348
1374
  lsall_old = @lsall
1349
1375
  main_getkey # Get key from user
1350
- break if @break # Break to outer loop, redrawing windows, if user hit 'r'
1351
1376
  break if Curses.cols != maxx or Curses.lines != maxy # break on terminal resize
1377
+ break if @break # Break to outer loop, redrawing windows, if user hit 'r'
1352
1378
  end
1353
1379
  ensure # On exit: close curses, clear terminal
1354
1380
  @write_conf_all = false
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: 1.5.0
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -34,7 +34,8 @@ description: 'A full featured terminal browser with syntax highlighted files, im
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
36
  other features. New in 1.5.0: Expanded ''/'' to jump to the first match and ''n''
37
- to jump to the next matched item (''j'' and ''J'' are now gone).'
37
+ to jump to the next matched item (''j'' and ''J'' are now gone). New in 1.5.4: Fixed
38
+ command output error - now shown in raght pane.'
38
39
  email: g@isene.com
39
40
  executables:
40
41
  - rtfm