rtfm-filemanager 1.2.3 → 1.3.3

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 +23 -3
  3. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1573528d1d7b7c001f2cd4a175b0bd17fd125451ad835827f5db2af5c3901a75
4
- data.tar.gz: bc533e59f667fa9e4b336a3335bb6e5cce39fbd44c7da222fcef1faf919ae9e5
3
+ metadata.gz: 7b542c242216ef7d3d496e7250d907a34f63579dc916a25b51421e7d2c88b691
4
+ data.tar.gz: d6b9f31b5dcd57fb6bb134511b8312576e1cfc7e2d2957966d2bc36ed6e157b8
5
5
  SHA512:
6
- metadata.gz: 97c41dc5d06e8ec8813f36fb4f875f9eab860b9f04c8e51d681038e951c4e3f7ffadbcdfcd88ebab872101f1762f582106195917d4125ac58152bad2339f0d60
7
- data.tar.gz: 225d46eebe4fd20be74a06d6a8c2c3b87d72f8c0a435a2856f7153d1b312589ebfbafc2066a069c2e93b57ce9ca8bd038da048b3486814caa8f358bbad2857e2
6
+ metadata.gz: dbe11dbc46f5b022d019f1351d8249a05ffd98f7b324d044cab28aa65c2e694ea39be93380e77ee819d8af3db3c746368c35acbe9af38726d5d499f498a5f385
7
+ data.tar.gz: 2fa548bb0711d7593708c376ab498d1e7eb406b0d93ef19b0127f4beae55042fc1bfa697b9d361d28629908bbcf7c04dbb79409b580cc2a8588fdb14ef51815a
data/bin/rtfm CHANGED
@@ -23,7 +23,8 @@ BASIC KEYS
23
23
  ? = Show this help text
24
24
  r = Refresh RTFM (recreates all windows. Use on terminal resize or when there is garbage somewhere)
25
25
  R = Reload configuration (~/.rtfm.conf)
26
- W = Write parameters to ~/.rtfm.conf (@lsall, @lslong, @border, @width, @preview, @tagged, @marks)
26
+ W = Write parameters to ~/.rtfm.conf
27
+ (@lsall, @lslong, @lsorder, @lsinvert, @border, @width, @preview, @tagged, @marks)
27
28
  q = Quit
28
29
  Q = QUIT (without writing changes to the config file)
29
30
 
@@ -81,6 +82,7 @@ RIGHT PANE
81
82
 
82
83
  ADDITINAL COMMANDS
83
84
  / = Enter search string in bottom window to highlight matching items
85
+ g = Run 'grep' to show files that contains the MATCH in current directory
84
86
  : = Enter "command mode" in bottom window (press ENTER to execute, press Ctrl-G to escape)
85
87
  ; = Show command history in right pane
86
88
  y = Copy path of selected item to primary selection (for pasting with middle mouse button)
@@ -396,6 +398,9 @@ def main_getkey # GET KEY FROM USER
396
398
  Dir.chdir(File.dirname(File.readlink(@selected)))
397
399
  end
398
400
  @w_b.update = true
401
+ when 'g' # Run 'grep' in the current directory
402
+ cmd = w_b_getstr(": ", "grep -s MATCH *")
403
+ w_b_exec(cmd)
399
404
  when 'L' # Run 'locate' and let user jump to a result (by '#')
400
405
  cmd = w_b_getstr(": ", "locate ")
401
406
  w_b_exec(cmd)
@@ -621,7 +626,10 @@ def main_getkey # GET KEY FROM USER
621
626
  @w_r.pager = 0
622
627
  @w_r.pager_more = false
623
628
  end
624
- @w_r.update = true if dir != Dir.pwd
629
+ begin
630
+ @w_r.update = true if dir != Dir.pwd
631
+ rescue
632
+ end
625
633
  end
626
634
  def conf_write
627
635
  if File.exist?(Dir.home+'/.rtfm.conf')
@@ -640,6 +648,10 @@ def conf_write
640
648
  conf += "@lslong = #{@lslong}\n"
641
649
  conf.sub!(/^@lsall.*\n/, "")
642
650
  conf += "@lsall = \"#{@lsall}\"\n"
651
+ conf.sub!(/^@lsorder.*\n/, "")
652
+ conf += "@lsorder = \"#{@lsorder}\"\n"
653
+ conf.sub!(/^@lsinvert.*\n/, "")
654
+ conf += "@lsinvert = \"#{@lsinvert}\"\n"
643
655
  conf.sub!(/^@width.*\n/, "")
644
656
  conf += "@width = #{@width}\n"
645
657
  conf.sub!(/^@border.*\n/, "")
@@ -1218,6 +1230,11 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
1218
1230
  @w_r.update = false
1219
1231
  end
1220
1232
  loop do # INNER, CORE LOOP
1233
+ begin # Jump to home dir if current dir is externally removed
1234
+ Dir.pwd
1235
+ rescue
1236
+ Dir.chdir
1237
+ end
1221
1238
  system("printf \"\033]0;RTFM: #{Dir.pwd}\007\"") # Set Window title to path
1222
1239
  ls_cmd = "ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}" # Get files in current directory
1223
1240
  @files = `#{ls_cmd} 2>/dev/null`.split("\n")
@@ -1269,7 +1286,10 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
1269
1286
  image_show("clear")
1270
1287
  close_screen
1271
1288
  # If launched via the script "r", return current dir and "r" will cd to that
1272
- File.write(ARGV[0], Dir.pwd) if ARGV[0] and ARGV[0].match(/\/tmp\/tmp/)
1289
+ begin
1290
+ File.write(ARGV[0], Dir.pwd) if ARGV[0] and ARGV[0].match(/\/tmp\/tmp/)
1291
+ rescue
1292
+ end
1273
1293
  end
1274
1294
  end
1275
1295
 
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.2.3
4
+ version: 1.3.3
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-09-27 00:00:00.000000000 Z
11
+ date: 2021-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -30,10 +30,11 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.3.2
33
- description: A full featured terminal browser with syntax highlighted files, images
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.
36
+ other features. New in 1.3.3: Fixed rtfm crashing when the current directory is
37
+ externally removed'
37
38
  email: g@isene.com
38
39
  executables:
39
40
  - rtfm