rtfm-filemanager 3.8 → 3.10

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 +14 -7
  3. metadata +3 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3699cc2dad80b5897439a8dae2a37a6865f2ce4eaab7f9f4f145aa81680796a8
4
- data.tar.gz: d8d969d05f715d99a6bf610771559810202da03b4de75d272c8ffb30f58b5e02
3
+ metadata.gz: '080c0934da9294dbad21bd902a119ae0dd533348f19eaa4841ac90f039741fb0'
4
+ data.tar.gz: 3839a9ad45595ce3cdec6fd0c9e9e29bc97a268c7876b6e8df9d93a33a9f0ae9
5
5
  SHA512:
6
- metadata.gz: 3498bc171b280b56c4a4661a8f4c41a9b4878392cefd8f9a33907d0d8dab771d4627e662b48fb3e23569c2433d6f9070c5d16068d6d350bd054e61f74e392517
7
- data.tar.gz: f17194010e4c9e218df33cfec4edaf0560c89c5e964709518d1374bc226ee094bd211695917dd96c249e35ace943d15e40798f47b6355bc9a82e9530d7100369
6
+ metadata.gz: 112a9732a52ca5d42405daf9e6405d6c86d54d434bfdbebb4da7bba5a1ef7dbfedad6a9293a3c65531320c2b317ae8300c7b0d49ebe15a83b51f21f991d07f19
7
+ data.tar.gz: e73ff6c29ee8e951bd255c21c2125b18431472f23d2e9a3876f5d738f8efd11748b4983ee34fd7ef5576e24c9d2c34ffe8fbd106ec4fd31b40668536d9818625
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.8"
17
+ @version = "3.10"
18
18
 
19
19
  # PRELIMINARIES
20
20
  @help = <<HELPTEXT
@@ -177,6 +177,7 @@ end
177
177
  begin # BASIC SETUP
178
178
  require 'fileutils'
179
179
  require 'io/console'
180
+ require 'io/wait'
180
181
  require 'date'
181
182
  require 'timeout'
182
183
  require 'curses'
@@ -318,9 +319,9 @@ def getchr # PROCESS KEY PRESSES
318
319
  c = STDIN.getch(min: 0, time: 3)
319
320
  case c
320
321
  when "\e" # ANSI escape sequences
321
- case $stdin.getc
322
+ case STDIN.getc
322
323
  when '[' # CSI
323
- case $stdin.getc
324
+ case STDIN.getc
324
325
  when 'A' then chr = "UP"
325
326
  when 'B' then chr = "DOWN"
326
327
  when 'C' then chr = "RIGHT"
@@ -334,7 +335,7 @@ def getchr # PROCESS KEY PRESSES
334
335
  when '8' then chr = "END" ; chr = "C-END" if STDIN.getc == "^"
335
336
  end
336
337
  when 'O' # Set Ctrl+ArrowKey equal to ArrowKey; May be used for other purposes in the future
337
- case $stdin.getc
338
+ case STDIN.getc
338
339
  when 'a' then chr = "C-UP"
339
340
  when 'b' then chr = "C-DOWN"
340
341
  when 'c' then chr = "C-RIGHT"
@@ -344,6 +345,7 @@ def getchr # PROCESS KEY PRESSES
344
345
  when "", "" then chr = "BACK"
345
346
  when "" then chr = "WBACK"
346
347
  when "" then chr = "LDEL"
348
+ when "" then chr = "C-C"
347
349
  when "" then chr = "C-G"
348
350
  when " " then chr = "C-L"
349
351
  when "" then chr = "C-N"
@@ -353,7 +355,7 @@ def getchr # PROCESS KEY PRESSES
353
355
  when "" then chr = "C-Y"
354
356
  when "\r" then chr = "ENTER"
355
357
  when "\t" then chr = "TAB"
356
- when /./ then chr = c
358
+ when /[[:print:]]/ then chr = c
357
359
  end
358
360
  return chr
359
361
  end
@@ -954,7 +956,7 @@ def get_files(win) # The core of the directory listings
954
956
  ls_cmd = "ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}" # Get files in current directory
955
957
  ls_cmd += @selected_safe if win == "right"
956
958
  @cfiles = `#{ls_cmd} --color`.split("\n")
957
- @files = @cfiles.map {|f| f.sub(/^\e\[.*\dm(..*$)/, '\1').sub(/\e.+/, '')}
959
+ @files = @cfiles.map {|f| f.sub(/^.*\d+m(.+)\e\[0m/, '\1')}
958
960
  ls_cmd += " -H " if win == "right"
959
961
  ls_cmd += %q[ -lh --time-style="long-iso" | awk '{printf "%s%s%s%11s%6s%6s", $1, " " $3, ":" $4,$6,$7,$5"\n"}']
960
962
  @fspes = `#{ls_cmd}`.split("\n").drop(1)
@@ -1440,7 +1442,7 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
1440
1442
  @w_b.setpos(0,pretext.length + pos)
1441
1443
  @w_b.refresh
1442
1444
  chr = getchr
1443
- if chr == "C-G"
1445
+ if chr == 'C-G' or chr == 'C-C'
1444
1446
  Curses.curs_set(0)
1445
1447
  Curses.noecho
1446
1448
  @w_b.update = true
@@ -1533,6 +1535,11 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
1533
1535
  @history[stk].insert(pos,chr)
1534
1536
  pos += 1
1535
1537
  end
1538
+ while STDIN.ready?
1539
+ chr = STDIN.getc
1540
+ @history[stk].insert(pos,chr)
1541
+ pos += 1
1542
+ end
1536
1543
  end
1537
1544
  curstr = @history[stk]
1538
1545
  @history.shift if @w_b.nohistory
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: '3.8'
4
+ version: '3.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -47,9 +47,7 @@ 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.8: Rewrite of core file listing engine for speedup. RTFM
51
- now handles simpler LS_COLORS. You can now supply a path as argument at startup
52
- to let RTFM start from that directory.'
50
+ other features. New in 3.10: Critical bugfix on syntax highlighting.'
53
51
  email: g@isene.com
54
52
  executables:
55
53
  - rtfm