srsh 0.7.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c0910382ad05f07b93041cfbecb7d3db98f24e23df1ecd5d23243aab35a7f63
4
- data.tar.gz: c39ce2184076112bb950035ea2f09939bef9f4105b2c207e6ec73ee152fc3c89
3
+ metadata.gz: 9a57dd7a03d68aed0d91904d56099b2b3fdf8766b62a98c5acd4bb86e6593293
4
+ data.tar.gz: 1d1c804627a25573bb2338434ff9b96131cb4edfe0697396b524b7a8586b9c5d
5
5
  SHA512:
6
- metadata.gz: ee7bd7e5ae91582ed612171eda2f3440d16d8d07988b465fd61470e094d80b0f766cfc6f248d2980f0371a0db228593a326934fe7f6c4367fb8e9b009213e26f
7
- data.tar.gz: 6195a9d026471e57b1b7b8f87970362261302d0e7f8b936a030ecc02bce7de2c56d3420d2e7cee0b7810f60acc32f5a171bd45acd1181ffc7d2469389f37ebd7
6
+ metadata.gz: 0a4c5d4c62a654284d241bc2a9eab9108559689522fbed7cf25fbb7740049ec5aa55b9bf760029b54e1953c9fd200754131c1f1efdb8bc339349530537f426f7
7
+ data.tar.gz: 3802eb18db7d0d2f49934d6aab2fbdfd0f191ebe30778ddb57534a6045a18df031dc037823d59c4467e9dfe53a76d6114d06642bbec7ef57511a872dd3721afc
data/LICENSE CHANGED
@@ -1,17 +1,12 @@
1
- Copyright (C) 2025 RobertFlexx
1
+ MIT License
2
2
 
3
- This software is provided 'as-is', without any express or implied
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
- Permission is granted to anyone to use this software for any purpose,
8
- including commercial applications, and to alter it and redistribute it
9
- freely, subject to the following restrictions:
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
- 1. The origin of this software must not be misrepresented; you must not
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
- This is version 0.6.0, if things dont work, or work optimally. If you notice anything wrong, please consult me.
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
- The code itself is written by RobertFlexx, but the comments are written by ChatGPT.
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
- ## Known Issues:
6
+ ## Usage
8
7
 
9
- * Flatpak chaining with 'and' doesn't work.
10
- * Running Shell Scripts might not always work. Sometimes it works, other times not so much.
8
+ After installing the gem:
11
9
 
12
- ## Please Consult:
10
+ srsh
13
11
 
14
- * if you have any issues with this SRSh version, please post an issue.
12
+ You can also run RSH scripts:
15
13
 
16
- ## How to Install:
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
data/exe/srsh ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "srsh"
5
+
6
+ exit(Srsh.run(ARGV) || 0)