ruby-shell 2.6 → 2.6.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/rsh +11 -9
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c5913a47ce444d23c974bea7579acfa7413ea40c127d8fe4f5fe22ff788b0ba
4
- data.tar.gz: 9dc3737af78ee22e40f630f69e9ed60942edbd94d5bdbc08515b2e7692529fdd
3
+ metadata.gz: abf81e738d6eec85e722c3aeb2f1994813266faa24772785ef045f22039a0b7a
4
+ data.tar.gz: 7911f8b5e4fede5f8c3d137a9b50b3362afe8ea18f9cbe5b489b8434e5b3f934
5
5
  SHA512:
6
- metadata.gz: ef49ff226a32103a6a345b5087f0b54776efbd02e4c7435dbb3e4ef2aac439c3221c6f8b4b361a7b38fecdc40b9301bdd6a247c7716353e69b8b8dfdf94dc1b0
7
- data.tar.gz: 519693833b835995ab7cdd9f7c4c089c611646eb46d195a9f5dc7aa4565190c23f3e5303624169336c43711753173b6197db47f32404b02052031ad626778abb
6
+ metadata.gz: 503296a0ae73254125e06f2602c04dda0425f0d91e26636152d4f7e97844e8fbacc6cb4bbcaca107456f54235cf47704630ec49f6c76d3f338e4e0207b164a38
7
+ data.tar.gz: 4843dddcb14764bcdd30da94b138117db82b038658268c461d867dfd5ab8a7529f90027ee175988b681bfb2db6b2e809c4a47b4f8aeab967367484ce838efae0
data/bin/rsh CHANGED
@@ -8,7 +8,7 @@
8
8
  # Web_site: http://isene.com/
9
9
  # Github: https://github.com/isene/rsh
10
10
  # License: Public domain
11
- @version = "2.6"
11
+ @version = "2.6.2"
12
12
 
13
13
  # MODULES, CLASSES AND EXTENSIONS
14
14
  class String # Add coloring to strings (with escaping for Readline)
@@ -312,6 +312,7 @@ def getstr # A custom Readline-like function
312
312
  exit
313
313
  when 'C-L' # Clear screen and set position to top of the screen
314
314
  @c.row(1)
315
+ @row0 = 1
315
316
  @c.clear_screen_down
316
317
  when 'UP' # Go up in history
317
318
  if @stk == 0 and @history[0].length > 0
@@ -432,20 +433,20 @@ def getstr # A custom Readline-like function
432
433
  @pos += 1
433
434
  end
434
435
  end
435
- #@c.col(@pos0 + @history[0].length)
436
436
  @c.clear_screen_down
437
437
  end
438
438
  def tab(type)
439
439
  i = 0
440
440
  chr = ""
441
441
  @tabarray = []
442
- @pretab = @history[0][0...@pos].to_s # Extract the current line up to cursor
443
- @postab = @history[0][@pos..].to_s # Extract the current line from cursor to end
444
- @c_row, @c_col = @c.pos # Get cursor position
445
- @tabstr = @pretab.split(/[|, ]/).last.to_s # Get the sustring that is being tab completed
446
- @tabstr = "" if @pretab[-1] =~ /[ |]/ # Tab from nothing if tabbing starts with space or pipe
447
- @tabstr = @pretab if type == "hist" # Searching for matches with whole string in history
448
- @pretab = @pretab.delete_suffix(@tabstr)
442
+ @pretab = @history[0][0...@pos].to_s # Extract the current line up to cursor
443
+ @postab = @history[0][@pos..].to_s # Extract the current line from cursor to end
444
+ @c_row, @c_col = @c.pos # Get cursor position
445
+ @row0 = @c_row # Save original row
446
+ @tabstr = @pretab.split(/[|, ]/).last.to_s # Get the sustring that is being tab completed
447
+ @tabstr = "" if @pretab[-1] =~ /[ |]/ # Tab from nothing if tabbing starts with space or pipe
448
+ @tabstr = @pretab if type == "hist" # Searching for matches with whole string in history
449
+ @pretab = @pretab.delete_suffix(@tabstr)
449
450
  type = "switch" if @tabstr[0] == "-"
450
451
  while chr != "ENTER"
451
452
  case type
@@ -546,6 +547,7 @@ def tab(type)
546
547
  end
547
548
  end
548
549
  @c.clear_screen_down
550
+ @row0 = @c_row
549
551
  @c.row(@c_row)
550
552
  @c.col(@c_col)
551
553
  @history[0] = @newhist0
metadata CHANGED
@@ -1,19 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.6'
4
+ version: 2.6.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: 2024-10-30 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'A shell written in Ruby with extensive tab completions, aliases/nicks,
14
14
  history, syntax highlighting, theming, auto-cd, auto-opening files and more. In
15
15
  continual development. New in 2.0: Full rewrite of tab completion engine. Lots of
16
- other bug fixes. 2.6: Handling line longer than terminal width.'
16
+ other bug fixes. 2.6: Handling line longer than terminal width. 2.6.2: Fixed issue
17
+ with tabbing at bottom of screen.'
17
18
  email: g@isene.com
18
19
  executables:
19
20
  - rsh