ruby-shell 0.15 → 0.16
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/README.md +3 -0
- data/bin/rsh +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f69b050eaa1e06a29a3e744fe6a0810ceeb7ccc3fd4eb0ce988e1a28932ece4
|
4
|
+
data.tar.gz: 9edc0f0d12ad882cf8fb1e7a1316b1ef19ee49e8a2c44f445d23be95cf0a02fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
[](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 =
|
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.
|
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
|
+
0.16: Fixed several bugs, added screencast (https://youtu.be/4P2z8oSo1u4).'
|
16
16
|
email: g@isene.com
|
17
17
|
executables:
|
18
18
|
- rsh
|