ruby-shell 3.6.6 → 3.6.8

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 +20 -6
  3. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d44bbe64562b7c33243966d234ef228b5c78b08fa4ca598322d7ce1e719393e
4
- data.tar.gz: b296eaa102212b14c2ae415d56c4f444e55b755d178f87e3a017d9d120de443d
3
+ metadata.gz: 00cad244ed4045544cd6acffac1799a77064c1815ac27a9a3fc1bb016d902e13
4
+ data.tar.gz: 5efc98a00cbfc393a4dd3db8cfb6f1342c8e3470f8a41920aa42c1b6a8b78caf
5
5
  SHA512:
6
- metadata.gz: 8bde232e33715197884a9d10f6b2059c7a3a6148833181d76ab733bff7f1d9bbffeefe6a02b3e7b1e39f49b2caf569f99f0166efbcfe420f80279920bbfb7480
7
- data.tar.gz: 4806cd6d2f6c907450738a294a490c16773525a1a2c5e4c1382903b508d30eddf63d8b79c8f181bf7f423dd5ac1fc632cefd3a82f142de0d1993448a79ff6405
6
+ metadata.gz: 3f7c5528555838aa159519eb60c9311206d1817c350930f86d179c15774170efed7690b08d048c2c5eb16a899376adfe1687577436fffc2204bc45fd0d067dec
7
+ data.tar.gz: d7a848b917003e8a7449f09d48d3f9cba04b0f400d36a92b9388d24dd7390a915ac097e9bf12b7d7f51b82251dfd386bbece7cca039f977f7eb3b047085792fc
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.3" # Polish: Config persistence, aligned display, smart completion space management
11
+ @version = "3.6.8" # Fix: cd now works in && chained commands
12
12
 
13
13
  # MODULES, CLASSES AND EXTENSIONS
14
14
  class String # Add coloring to strings (with escaping for Readline)
@@ -2978,7 +2978,7 @@ def apply_auto_correct(cmd) # Apply auto-correction to command
2978
2978
  return cmd unless @auto_correct
2979
2979
  return cmd if cmd =~ /^:/ # Don't auto-correct colon commands
2980
2980
  return cmd if cmd.include?('/') # Don't auto-correct paths
2981
- return cmd unless cmd =~ /^(\w+)/
2981
+ return cmd unless cmd =~ /^([\w.-]+)/ # Capture command including extensions (.sh, .py, etc.)
2982
2982
 
2983
2983
  first_cmd = $1
2984
2984
 
@@ -3029,11 +3029,25 @@ def execute_conditional(cmd_line)
3029
3029
  end
3030
3030
  end
3031
3031
  else
3032
- # Execute the command
3033
- success = system(part)
3032
+ # Execute the command - handle cd as built-in
3033
+ if part =~ /^cd\s+(.+)$/ || part == "cd"
3034
+ dir = $1 || Dir.home
3035
+ dir = dir.sub(/^~/, Dir.home)
3036
+ if Dir.exist?(dir)
3037
+ Dir.chdir(dir)
3038
+ success = true
3039
+ @last_exit = 0
3040
+ else
3041
+ puts " cd: no such directory: #{dir}"
3042
+ success = false
3043
+ @last_exit = 1
3044
+ end
3045
+ else
3046
+ success = system(part)
3047
+ @last_exit = $?.exitstatus
3048
+ puts " Command failed: #{part} (exit #{@last_exit})" unless success
3049
+ end
3034
3050
  result = success
3035
- @last_exit = $?.exitstatus
3036
- puts " Command failed: #{part} (exit #{@last_exit})" unless success
3037
3051
  end
3038
3052
  end
3039
3053
 
metadata CHANGED
@@ -1,19 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.6
4
+ version: 3.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-18 00:00:00.000000000 Z
11
+ date: 2026-01-16 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
15
- v3.6.6: Nick persistence fix - Nicks and gnicks now merge on exit, preventing loss
16
- when multiple instances overwrite .rshrc.'
15
+ v3.6.8: Fix cd in chained commands - cd now works correctly with && and || operators.'
17
16
  email: g@isene.com
18
17
  executables:
19
18
  - rsh