2023-05-01 13:42:56 +02:00
2023-05-01 13:42:56 +02:00
2023-01-10 22:46:37 +01:00
2022-12-06 17:59:26 +01:00
2023-02-23 11:53:49 +01:00
2023-03-14 22:27:43 +01:00
2023-03-04 14:30:13 +01:00

Sqish

Sqish's goal

Squi's Shell, aka Sqish. This is an attempt to create a simple but usable shell in Rust, because why not. The goal (for me) is also to get more familiar with Rust since I read the Rust book and want to try things out. And, at last, building and using your own tools is pretty cool.

I also implemented user-configurable hotkeys (they're more akin to a form of macros really), because I don't think a lot of shells do that and I wanted something unique.

Current state

Currently, the shell is pretty rough around the edges, but usable, at least for my day to day use. It's not really and equivalent to bash as it does not implement any form of scripting; the only supported operation is piping. My goal is to build a shell for my everyday use as a Linux sysadmin: simple, fast, with just the features that I need.

Scripting ?

I don't like shell scripting and don't use it (I know the basics, but Ansible and Python are my bread and butter). Building a lexer is not part of the project. Bash / Zsh / Python / etc are still usable when running sqish, so that's that.

Sqish is now my default shell on my home computer, and I'll keep adding features as I come across them.

Also keep in mind I'm a beginner in Rust, so the code is pretty dirty; I will probably come around to reformating it once I have all the features I want and ironed out all the bugs.

TODO

TODO (Reformat):

  • Creating a struct "shell" that contains builder method taking an input and an output as parameters as well as a conf could be cool

TODO (features):

  • Add a &&

TODO (Bugz):

  • Autocomplete shits itself when typing a path starting with /

sqishrc (Config)

See the included sqishrc file included for comments, and copy it as ~/.sqishrc for use (optionnal).

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 or Ctrl+D : Quits the shell immediatly
  • Ctrl+U : Clears currently written line
  • Alt+. : Appends the last word from previous command
  • Alt+! : Show a list of the user-configured hotkeys and aliases
  • 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
  • Ctrl+L : Clears the screen
  • Ctrl+P : Jump to the next word (kinda)
  • Ctrl+O : Jump to the previous word (kinda)

In Text:

  • !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.
Description
Trying to create / improve a shell written in Rust.
Readme 172 KiB
v1.0.1 Latest
2023-11-16 16:58:13 +01:00
Languages
Rust 99.1%
Makefile 0.9%