ruby-shell 2.6 → 2.6.2
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.
- checksums.yaml +4 -4
- data/bin/rsh +11 -9
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf81e738d6eec85e722c3aeb2f1994813266faa24772785ef045f22039a0b7a
|
4
|
+
data.tar.gz: 7911f8b5e4fede5f8c3d137a9b50b3362afe8ea18f9cbe5b489b8434e5b3f934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
443
|
-
@postab
|
444
|
-
@c_row, @c_col = @c.pos
|
445
|
-
@
|
446
|
-
@tabstr
|
447
|
-
@tabstr
|
448
|
-
@
|
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:
|
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-
|
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
|