Aliases work, Alt + . works, README update

This commit is contained in:
Justine
2023-02-19 19:28:01 +01:00
parent 3f4d13769e
commit 08f80a57c1
5 changed files with 59 additions and 97 deletions

View File

@ -2,25 +2,25 @@
Rust Shell. This is an attempt to create a simple shell in Rust, because why not.
TO DO:
* Add prompt RGB support
* Implement Alt+z cancels last hotkey, and also "$ENTER_" is like pressing enter
* Add aliases in sqishrc (same old same old)
* Implement Alt+z cancels last hotkey (meh),
* rc file shoudl probably just be called .sqishrc, and history .sqishrc.hist
* Add an Ascii header when starting with a waifu or smth I don't know I'm tired
* Re-format syntax, notably for if / else :
```rust
//One-liner should like :
if something() { do_something(); }
//multiline should look like
if something() {
do_it();
}
else {
do_other();
}
```
## sqishrc (Config)
See the included sqishrc.yaml.example file included, and copy it as ~/.sqishrc.yaml
## Built-in shortcuts
### As Hotkeys
Some shortcuts are built in. They may be unique to Sqish or be copied from Zsh for example.
* Ctrl+Q : Quits the shell immediatly
* Ctrl+U : Clears currently written line
* Alt+. : Appends the last word from previous command
* Ctrl+A : Jumps to the end of the line
* Ctrl+E : Jumps to the start of the line
* Ctrl+C : Clears the current line and starts a new one
### In Text:
* !12 : Reruns command number 12 from history (Replace the number with anything)
* !! : Appends the previous command to the current line