ruby-shell 3.6.18 → 3.6.19

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/rsh +13 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e9ecc77e9137be0869ab5108ca168b9af1fe7482f7c48db56d222381f3e0c2b
4
- data.tar.gz: ffb83039ed726fdc1484e9c4d283525205dc39cd8a346c981005da8f14c3e5ac
3
+ metadata.gz: 6a7f4341f245a647d8c45ea36e67f17af871a3dd8dd67b0344257b152d7284ab
4
+ data.tar.gz: 3a5ec017025daf61f39070689728ef14b787a47964084058be21279b2ef9f795
5
5
  SHA512:
6
- metadata.gz: a5bd6cc37c73511c6267b246c86048f55a48bb6054d9e2242b958f5d6a164a81d04c090b6c0ff053afa84e4ac64fcac2b4e36cae11926f45f7553af1461a27ee
7
- data.tar.gz: abe9d8a5fcb1738492c99301c2f2171b4abb5450a4c24f79294b2eebe98a12e7962557e13d0bd79f068423d970223ea4af94358f6f7d40a577af81315efee2e3
6
+ metadata.gz: 1757bf42491dbde8d205d2756d8c3f41fba9dca3145e523d573ad40c6ffed4009ec35774f56da340936e8ddb71b7ebf53b6da366610a7564a296e08859a4a632
7
+ data.tar.gz: 302631f9c4d365913bdb796179d8dcb2e67f45038230470d2ba3500e7d2f8606bee41543dfa35f4c87077150472327f7a9a156effc32435044809af9e15c4038
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 = "3.6.18" # Fix nick deletion and hyphenated command handling
11
+ @version = "3.6.19" # Fix nick deletion and hyphenated command handling
12
12
 
13
13
  # MODULES, CLASSES AND EXTENSIONS
14
14
  class String # Add coloring to strings (with escaping for Readline)
@@ -562,9 +562,18 @@ def getstr # A custom Readline-like function
562
562
  end
563
563
  end
564
564
  lift = true
565
- when 'C-Y' # Copy command line to primary selection
566
- IO.popen('xclip', 'w') { |io| io.write(@history[0]) }
567
- puts "\n#{Time.now.strftime("%H:%M:%S")}: Copied to primary selection (paste with middle buttoni)".c(@c_stamp)
565
+ when 'C-Y' # Copy to clipboard
566
+ if @history[0].empty? && @history[1]
567
+ # Empty line: copy last command to clipboard
568
+ IO.popen('xclip -selection clipboard', 'w') { |io| io.write(@history[1]) } rescue nil
569
+ IO.popen('xclip -selection primary', 'w') { |io| io.write(@history[1]) } rescue nil
570
+ puts "\n#{Time.now.strftime("%H:%M:%S")}: Last command copied to clipboard".c(@c_stamp)
571
+ else
572
+ # Non-empty line: copy current line to clipboard
573
+ IO.popen('xclip -selection clipboard', 'w') { |io| io.write(@history[0]) } rescue nil
574
+ IO.popen('xclip -selection primary', 'w') { |io| io.write(@history[0]) } rescue nil
575
+ puts "\n#{Time.now.strftime("%H:%M:%S")}: Copied to clipboard".c(@c_stamp)
576
+ end
568
577
  when 'C-Z' # Suspend current process (background job)
569
578
  if @current_pid
570
579
  puts "\n[#{@job_id}] Suspended #{@current_pid}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.18
4
+ version: 3.6.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-23 00:00:00.000000000 Z
11
+ date: 2026-03-25 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. UPDATE