Added the hk command

This commit is contained in:
Justine Pelletreau
2023-11-17 18:07:03 +01:00
parent 9cba5cfde7
commit 57c13fc15b
2 changed files with 46 additions and 4 deletions

View File

@ -29,8 +29,8 @@ TODO (Bugz):
## sqishrc (Config)
See the included sqishrc file included for comments, and copy it as ~/.sqishrc for use (optionnal).
## Built-in shortcuts
### As Hotkeys
## Built-ins
### Hotkeys
Some shortcuts are built in. They may be unique to Sqish or be copied from Zsh for example.
* Ctrl+Q or Ctrl+D : Quits the shell immediatly
* Ctrl+U : Clears currently written line
@ -47,5 +47,9 @@ Some shortcuts are built in. They may be unique to Sqish or be copied from Zsh f
* !12 : Returns command number 12 from history (Replace the number 12 with any number from history). You can add commands after it, like: "!12 | grep squirrel"
* !! : Appends the previous command to the current line. Same principle as !12.
### Built-in commands
* hk <LETTER from A to Z> <command> : For the current session, records the hotkey Alt+LETTER to run the command given. Does not run the command itself. Takes precedence over config-defined hotkeys. For example, after running :
```
hk a ls -ltr
```
...pressing Alt+A would run "ls -ltr" directly, for the current session.