srsh 0.7.0 → 0.8.0
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/LICENSE +9 -14
- data/README.md +8 -229
- data/exe/srsh +6 -0
- data/lib/srsh/runner.rb +2416 -0
- data/lib/srsh.rb +9 -0
- metadata +13 -12
- data/bin/srsh +0 -1224
- data/lib/srsh/version.rb +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a57dd7a03d68aed0d91904d56099b2b3fdf8766b62a98c5acd4bb86e6593293
|
|
4
|
+
data.tar.gz: 1d1c804627a25573bb2338434ff9b96131cb4edfe0697396b524b7a8586b9c5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a4c5d4c62a654284d241bc2a9eab9108559689522fbed7cf25fbb7740049ec5aa55b9bf760029b54e1953c9fd200754131c1f1efdb8bc339349530537f426f7
|
|
7
|
+
data.tar.gz: 3802eb18db7d0d2f49934d6aab2fbdfd0f191ebe30778ddb57534a6045a18df031dc037823d59c4467e9dfe53a76d6114d06642bbec7ef57511a872dd3721afc
|
data/LICENSE
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
warranty. In no event will the authors be held liable for any damages
|
|
5
|
-
arising from the use of this software.
|
|
3
|
+
Copyright (c) 2025 RobertFlexx
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
claim that you wrote the original software. If you use this software
|
|
13
|
-
in a product, an acknowledgment in the product documentation would be
|
|
14
|
-
appreciated but is not required.
|
|
15
|
-
2. Altered source versions must be plainly marked as such, and must not be
|
|
16
|
-
misrepresented as being the original software.
|
|
17
|
-
3. This notice may not be removed or altered from any source distribution.
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
data/README.md
CHANGED
|
@@ -1,235 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
(Fixed Control-C, fixed some bugs, added new features (check via help command)
|
|
3
|
-
THIS IS A BETA RELEASE, IT MAY NOT WORK.
|
|
1
|
+
# srsh
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
srsh is a Ruby-based interactive shell with its own scripting language (RSH),
|
|
4
|
+
theme system, plugin support, and advanced line-editing features.
|
|
6
5
|
|
|
7
|
-
##
|
|
6
|
+
## Usage
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
* Running Shell Scripts might not always work. Sometimes it works, other times not so much.
|
|
8
|
+
After installing the gem:
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
srsh
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
You can also run RSH scripts:
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Clone the repository
|
|
19
|
-
|
|
20
|
-
```console
|
|
21
|
-
git clone https://github.com/RobertFlexx/RSH
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Change the directory to where the Ruby Script is located
|
|
25
|
-
|
|
26
|
-
```console
|
|
27
|
-
cd RSH
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### And finally run it
|
|
31
|
-
|
|
32
|
-
```console
|
|
33
|
-
./rsh
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Requirements
|
|
39
|
-
|
|
40
|
-
* Ruby installed (2.7+ is recommended; newer is better).
|
|
41
|
-
* A POSIX-ish terminal (Linux, *BSD, macOS Terminal, iTerm2, etc).
|
|
42
|
-
* `./rsh` needs the executable bit set:
|
|
43
|
-
|
|
44
|
-
```console
|
|
45
|
-
chmod +x rsh
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If `./rsh` complains or behaves oddly, **run it directly in the repo first** before messing with symlinks or PATH.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Basic Usage
|
|
53
|
-
|
|
54
|
-
Once you’re in the repo:
|
|
55
|
-
|
|
56
|
-
```console
|
|
57
|
-
./rsh
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Inside `srsh` / `rsh` you can:
|
|
61
|
-
|
|
62
|
-
* Use normal commands (`ls`, `cat`, `grep`, etc.).
|
|
63
|
-
* Use built-ins:
|
|
64
|
-
|
|
65
|
-
* `help` – show builtin help with all srsh-specific commands.
|
|
66
|
-
* `systemfetch` – prints system info with nice bars.
|
|
67
|
-
* `hist` – view shell history.
|
|
68
|
-
* `clearhist` – clear history (memory + file).
|
|
69
|
-
* `alias` / `unalias` – manage aliases.
|
|
70
|
-
* Enjoy:
|
|
71
|
-
|
|
72
|
-
* **Autosuggestions** (ghost text from history).
|
|
73
|
-
* **Smart Tab completion**:
|
|
74
|
-
|
|
75
|
-
* Completes commands, files, dirs.
|
|
76
|
-
* `cd` → only directories.
|
|
77
|
-
* `cat` → only files.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Adding `rsh` / `srsh` to your PATH
|
|
82
|
-
|
|
83
|
-
So you don’t have to always `cd` into the repo and run `./rsh`, you can either:
|
|
84
|
-
|
|
85
|
-
1. Add the repo directory to your `PATH`, or
|
|
86
|
-
2. Symlink the script into a directory that’s already on your `PATH`.
|
|
87
|
-
|
|
88
|
-
> ⚠️ There is a *system* command called `rsh` on some systems.
|
|
89
|
-
> To avoid conflict, using the name `srsh` for the installed command is usually safer.
|
|
90
|
-
|
|
91
|
-
### Option 1 — Add the repo directory to PATH (Linux & macOS, bash/zsh)
|
|
92
|
-
|
|
93
|
-
Assuming the repo is at `~/RSH`:
|
|
94
|
-
|
|
95
|
-
```console
|
|
96
|
-
chmod +x ~/RSH/rsh
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
#### For `bash` (Linux, older macOS)
|
|
100
|
-
|
|
101
|
-
Add this line to `~/.bashrc` (or `~/.bash_profile` on macOS):
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
export PATH="$HOME/RSH:$PATH"
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Then reload:
|
|
108
|
-
|
|
109
|
-
```console
|
|
110
|
-
source ~/.bashrc
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### For `zsh` (default on modern macOS)
|
|
114
|
-
|
|
115
|
-
Add this line to `~/.zshrc`:
|
|
116
|
-
|
|
117
|
-
```zsh
|
|
118
|
-
export PATH="$HOME/RSH:$PATH"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Reload:
|
|
122
|
-
|
|
123
|
-
```console
|
|
124
|
-
source ~/.zshrc
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Now you can just run:
|
|
128
|
-
|
|
129
|
-
```console
|
|
130
|
-
rsh
|
|
131
|
-
# or if you prefer to rename it:
|
|
132
|
-
srsh
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
### Option 2 — Symlink into `/usr/local/bin` (Linux & macOS)
|
|
138
|
-
|
|
139
|
-
This keeps your PATH clean and gives you a nice command name.
|
|
140
|
-
|
|
141
|
-
From the repo directory:
|
|
142
|
-
|
|
143
|
-
```console
|
|
144
|
-
chmod +x rsh
|
|
145
|
-
sudo ln -s "$(pwd)/rsh" /usr/local/bin/srsh
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Now you can just type:
|
|
149
|
-
|
|
150
|
-
```console
|
|
151
|
-
srsh
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
from anywhere.
|
|
155
|
-
|
|
156
|
-
If you really, really want to override the system `rsh` (not recommended):
|
|
157
|
-
|
|
158
|
-
```console
|
|
159
|
-
sudo ln -s "$(pwd)/rsh" /usr/local/bin/rsh
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
### *BSD: Adding to PATH
|
|
165
|
-
|
|
166
|
-
On *BSD, the default shell might be `sh`, `ksh`, `csh`, or `tcsh`. Same idea, different config files.
|
|
167
|
-
|
|
168
|
-
Assuming repo at `~/RSH`:
|
|
169
|
-
|
|
170
|
-
```console
|
|
171
|
-
chmod +x ~/RSH/rsh
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
#### For `sh` / `ksh` / `ash` / `dash` style shells
|
|
175
|
-
|
|
176
|
-
Add to `~/.profile`:
|
|
177
|
-
|
|
178
|
-
```sh
|
|
179
|
-
export PATH="$HOME/RSH:$PATH"
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Then either log out and back in, or:
|
|
183
|
-
|
|
184
|
-
```console
|
|
185
|
-
. ~/.profile
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
#### For `csh` / `tcsh`
|
|
189
|
-
|
|
190
|
-
Edit `~/.cshrc` (or `~/.tcshrc`) and add:
|
|
191
|
-
|
|
192
|
-
```csh
|
|
193
|
-
set path = ( $HOME/RSH $path )
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Reload it:
|
|
197
|
-
|
|
198
|
-
```console
|
|
199
|
-
source ~/.cshrc
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Now you should be able to run:
|
|
203
|
-
|
|
204
|
-
```console
|
|
205
|
-
rsh
|
|
206
|
-
# or rename / symlink it as srsh if you want:
|
|
207
|
-
srsh
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Tips / Notes
|
|
213
|
-
|
|
214
|
-
* If the command **isn’t found** after editing PATH:
|
|
215
|
-
|
|
216
|
-
* Check which shell you’re actually using:
|
|
217
|
-
|
|
218
|
-
```console
|
|
219
|
-
echo $SHELL
|
|
220
|
-
```
|
|
221
|
-
* Make sure you edited the correct rc file for that shell.
|
|
222
|
-
* Print your PATH to confirm:
|
|
223
|
-
|
|
224
|
-
```console
|
|
225
|
-
echo "$PATH"
|
|
226
|
-
```
|
|
227
|
-
* If things feel off, run it directly from the repo with:
|
|
228
|
-
|
|
229
|
-
```console
|
|
230
|
-
./rsh
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
to see if the issue is PATH-related or shell-related.
|
|
234
|
-
|
|
235
|
-
And as i say : if anything looks cursed, **consult me and/or open an issue** :D
|
|
14
|
+
srsh script.rsh arg1 arg2
|