ruby-shell 0.15 → 0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/bin/rsh +4 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cc8a3f3e80656d09aeb3dc8e1d4a803d0cdd4230d2e32036d0de7fb24746b19
4
- data.tar.gz: b08319ac8b7c86c6ba235a45b03f84727e833477ea4aeb3f26a4422a19032632
3
+ metadata.gz: 0f69b050eaa1e06a29a3e744fe6a0810ceeb7ccc3fd4eb0ce988e1a28932ece4
4
+ data.tar.gz: 9edc0f0d12ad882cf8fb1e7a1316b1ef19ee49e8a2c44f445d23be95cf0a02fd
5
5
  SHA512:
6
- metadata.gz: 5f9f896f49182e320519dce320605c8c9d1cdde7cbb072379062c148a8764f546673150bb8a7e18bf7fa8d841cffeb7f89966f9500b9c99cdc9b551778dfbba2
7
- data.tar.gz: 89fde9f621cf09e57dae9a2ce5f1182755769dc2d0ee53a91cec797ee0e1954b107f97d4cf9a879f0df13d27574d6fe19821632bc78de08137ee8f0efbbb9d7b
6
+ metadata.gz: 39a5f34c1360543721e1b30a219cb8e3a31578a64a5e503f034dadc934a655f794360ee2eab065c73a937445c901c2b918695fc0ea478a8b1dffcf9633ce72f6
7
+ data.tar.gz: e3f29df7548b173a33e0ae882f651f8b8609de3a3228f366177866253b89c1483f9dfdfbeed59e2ae80168f4d6dd0eabb007ce26e35582a125afacb6dc91a3cc
data/README.md CHANGED
@@ -39,6 +39,9 @@ Special commands:
39
39
  * `:history` will list the command history, while `:rmhistory` will delete the history
40
40
  * `:help` will display this help text
41
41
 
42
+ ## Screencast
43
+ [![rsh screencast](/img/rsh-screencast.png)](https://youtu.be/4P2z8oSo1u4)
44
+
42
45
  ## Moving around
43
46
  While you `cd` around to different directories, you can see the last 10 directories visited via the command `:dirs` or the convenient shortcut `#`. Entering the number in the list (like `6` and ENTER) will jump you to that directory. Entering `-` will jump you back to the previous dir (equivalent of `1`. Entering `~` will get you to your home dir. If you want to bookmark a special directory, you can do that via a general nick like this: `:gnick "x = /path/to/a/dir/"` - this would bookmark the directory to the single letter `x`.
44
47
 
data/bin/rsh CHANGED
@@ -517,6 +517,8 @@ def cmd_check(str) # Check if each element on the readline matches commands, nic
517
517
  el.c(@c_path)
518
518
  elsif system "which #{el}", %i[out err] => File::NULL
519
519
  el.c(@c_cmd)
520
+ elsif el == "cd"
521
+ el.c(@c_cmd)
520
522
  elsif el =~ /^-/
521
523
  el.c(@c_switch)
522
524
  else
@@ -644,6 +646,7 @@ loop do
644
646
  @cmd = @cmd.gsub(Regexp.union(ca.keys), @nick)
645
647
  ga = @gnick.transform_keys {|k| /\b#{Regexp.escape k}\b/}
646
648
  @cmd = @cmd.gsub(Regexp.union(ga.keys), @gnick)
649
+ @cmd = "~" if @cmd == "cd"
647
650
  @cmd.sub!(/^cd (\S*).*/, '\1')
648
651
  @cmd = Dir.home if @cmd == "~"
649
652
  @cmd = @dirs[1] if @cmd == "-"
@@ -655,7 +658,7 @@ loop do
655
658
  else
656
659
  puts "#{Time.now.strftime("%H:%M:%S")}: #{@cmd}".c(@c_stamp)
657
660
  if @cmd == "f" # fzf integration (https://github.com/junegunn/fzf)
658
- res = `#{@cmd}`.chomp
661
+ res = `fzf`.chomp
659
662
  Dir.chdir(File.dirname(res))
660
663
  else
661
664
  if File.exist?(@cmd)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.15'
4
+ version: '0.16'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -12,7 +12,7 @@ date: 2023-06-08 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 and more. In continual development. New in
15
- 0.15: Better stack handling for history.'
15
+ 0.16: Fixed several bugs, added screencast (https://youtu.be/4P2z8oSo1u4).'
16
16
  email: g@isene.com
17
17
  executables:
18
18
  - rsh