ruby-shell 2.0 → 2.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 +5 -8
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ec039977b048309a3b3762f8b009b83820693ec99857c9ce700322339dbecf5
4
- data.tar.gz: 35498c5cdd7dd2eea545b85d994370dca0cfadb74415eb28bf0169f46673c425
3
+ metadata.gz: 16401f8cae0a48a872039d91e89c0dfc441e1a6e06eba0c27d5035176daa6c24
4
+ data.tar.gz: df7f01fe21f17b7e38578c5ef539532ea37f0af23f9c35b2cbcc214cfbe8624c
5
5
  SHA512:
6
- metadata.gz: b262ececc24a31380445f8e88e645cccbef5bb4ce043143d4268c6a116bbe4df3293cd5affd26b036be1d58af7bf4fd653b1f1747a78419e40a3ef0e34d41380
7
- data.tar.gz: 9de2ac401010abd356a3b1aefca9848de07ba1829eb45c958a963b40d78825449de04737b9e0cf78da5ba2f1530e5306656830d3c5a4ae61d6635ccb749abe6c
6
+ metadata.gz: 771ef428fc45880ca4bcfc954b4296a7d1cb98903b038a85aa8d959e2c1f0b5c7f568060b47adc7068020543fd1663a6473cfbf04ea636b7038e467115f89e13
7
+ data.tar.gz: 69be18e3477784987d41b16b8376894a43d8efbe0e1313b36926342abece6769750a8965046f848bd138f5680d4a214cb9a1f08c93bbe99ad803f990030bbb94
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.0"
11
+ @version = "2.2"
12
12
 
13
13
  # MODULES, CLASSES AND EXTENSIONS
14
14
  class String # Add coloring to strings (with escaping for Readline)
@@ -120,9 +120,7 @@ begin # Initialization
120
120
  @history = [] # Initiate history array
121
121
  # Paths
122
122
  @user = Etc.getpwuid(Process.euid).name # For use in @prompt
123
- @path = ["/bin",
124
- "/usr/bin",
125
- "/home/#{@user}/bin"] # Basic paths for executables if not set in .rshrc
123
+ @path = ENV["PATH"].split(":") # Get paths
126
124
  # History
127
125
  @histsize = 200 # Max history if not set in .rshrc
128
126
  @hloaded = false # Variable to determine if history is loaded
@@ -253,7 +251,7 @@ def getchr # Process key presses
253
251
  when /[[:print:]]/ then chr = c
254
252
  else chr = ""
255
253
  end
256
- stdin_clear
254
+ #stdin_clear
257
255
  return chr
258
256
  end
259
257
  def getstr # A custom Readline-like function
@@ -410,7 +408,6 @@ def getstr # A custom Readline-like function
410
408
  @c.col(@pos0 + @history[0].length)
411
409
  @c.clear_screen_down
412
410
  end
413
-
414
411
  def tab(type)
415
412
  i = 0
416
413
  chr = ""
@@ -746,8 +743,8 @@ loop do
746
743
  end
747
744
  end
748
745
  end
749
- #rescue StandardError => err # Throw error nicely
750
- # puts "\n#{err}"
746
+ rescue StandardError => err # Throw error nicely
747
+ puts "\n#{err}"
751
748
  end
752
749
  end
753
750
 
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.0'
4
+ version: '2.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-23 00:00:00.000000000 Z
11
+ date: 2024-10-24 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.'
16
+ other bug fixes. 2.1: Better error handling. 2.2: Fixed pasting to commandline and
17
+ reading of PATH'
17
18
  email: g@isene.com
18
19
  executables:
19
20
  - rsh