A shell Made in rust 🦀

Related tags

Command-line vsh
Overview

vsh

A Blazingly fast shell made in Rust 🦀

Why make another shell?

Because the current leading rust shell is very opinionated, atleast to me. As it brings a lot to the table for someone who just wants a shell but in rust, new ls command, new scripting experiece etc. What's needed is just bash but in rust and vsh is there to deliver, the planned scripting language will be a 1:1 copy of bash and all of its features so that people don't feel homesick or dropped into a new space when they start using vsh. As the for shell prompt I plan to expand upon it to add plugins to accept a wide array of custom plugins all written in vsh. Till then feel free to contribute yourself!

Fonts Needed

Now that the prompt has been given a complete overhaul, you will need need to install nerd fonts to run vsh properly. Click here to choose your own nerd font, no need to worry as the font that you are used to using should probably have its own nerd font counterpart. I recommend using Jetbrains Mono Nerd font to get started!

Roadmap

  • Proper Prompt
  • Run commands
  • Exit with Ctrl+C & Ctrl+D via Rustyline
  • Good looking prompt
  • Multiple Commands
  • Piping
  • Command Completion
  • Command History
  • vsh Scripting language 👀
  • Custom ls command
  • Intergration with git, node and cargo
  • Customization via .vshrc
  • Plugin Support (Yikes!)
Comments
  • [Draft] Custom theme

    [Draft] Custom theme

    So this is related to #9 since it will be useful for formatting git infos. Objectives:

    • Provide a way to customize prompt
    • Replace classic, modern and arrow with a corresponding theme file

    Implementation idea: So first of all i had the idea of using a runtime formatting library such as mustache but it would cause problem for text coloring since these formater just replace and not color anything. So we have to implement our parser to do some token recognition. For that there is a library nom well known for parsing byte data and also string. With that in mind i had to think about a theme file syntax. Here is an example i had in mind:

    &[#FF00FF]`[`{{home_dir}}`]`&[#00FF00]{{user_input}}
    

    So

    • &[#FF00FF] tells to color the next string with the corresponding hex color. Everything will have this color until the next &[#00FF00]
    • [ is a string literal so it would be display as [
    • {{home}} is for variable it would be replace with the correct value (for example ~/Documents/vsh). There could be a lot of different variable like time, hostname, user, return code of previous program...

    Anyway here is the current roadmap:

    • [x] Implement a parser
    • [x] Color & replace variables
    • [x] Load theme from config file
    • [x] Flexibility for variables / large choice + documentation
    • [x] Background color
    • [x] Text style (bold italic etc)
    • [x] Allow new line to be added outside string literal
    • [x] Error handling
    • [ ] Non truecolor support
    • [ ] Replace current theme with a theme string using the parser
    opened by MalauD 10
  • Improved Experience

    Improved Experience

    I implemented parsing of any size commands, including using exec as a prefix. I also implemented it in a way that makes it easy to add asynchronous commands (ones that are called ending in "&"): all that has to be done is send them to another thread to be called. I improved install.py by requiring a correct answer instead of simply repeating it, and I implemented a way to preview the releases in the installer, as well as providing a way of installing a default configuration file. Finally, I improved error reporting and fixed crashes in the commands.

    opened by FeistyKit 4
  • Command as prompt (eg. starship)

    Command as prompt (eg. starship)

    Hi there. This looks like a really neat project! I would even consider using it instead of ZSH once piping and the scripting language features are fully implemented 😄

    Even though there isn't any of that yet, I don't see a way for me to run a external command such as Starship as my prompt. Would this be possible to implement?

    feature request 
    opened by theoparis 1
  • Stability

    Stability

    I did a few edits for stability, mostly just to prevent crashing. I also implemented expanding ("~/Downloads" becomes "$HOME/Downloads") in path names, which can be escaped.

    opened by FeistyKit 1
  • README Formatting

    README Formatting

    Remove a lot of the excess HTML in the README and add license to the README.

    The HTML renders differently on different platforms and doesn't look proper now. 2021-12-19_19-32

    opened by coastalwhite 0
  • [Draft] Git support

    [Draft] Git support

    What i want to implement:

    • [x] Current branch and files modified
    • [x] Optionally see how many lines were added/deleted
    • [ ] Customization of how everything is visualized (colors, position) using .vshrc.toml (might require a run time formatting library such as runtime-fmt)
    • [ ] Auto complete on git commands

    Some observation regarding this pr:

    • It introduces a lot of new dependency and some of these are quite heavy (openssl) so may be the choice of git2 is not the best idea. I made this choice because it's quite popular and has every functionality of git.
    • Storing and recreating an instance on every prompt is not ideal, i'm currently looking for a better implementation, if you have any suggestion, please do a suggestion.
    • It might be a good idea to implement git as a plugin
    opened by MalauD 9
Releases(v0.1.19)
Owner
I love to make things for the heck of it, Rust elitist
null
A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

Sebastián Romero Cruz 1 Apr 10, 2022
a cute shell thingy that written in rust

a cute shell thingy that written in rust

奥田 龍馬 12 Dec 29, 2021
A Unix shell written and implemented in rust 🦀

vsh A Blazingly fast shell made in Rust ?? Installation Copy and paste the following command and choose the appropriate installtion method for you. Yo

XMantle 89 Dec 18, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Chris Dickinson 52 Mar 25, 2022
Toy Shell Written in Rust

This is a simple toy shell written in Rust language with porpose of learning system programmim, and in a specific theme, process management.

Júlio César de Brito Gardona 4 May 22, 2022
Safe Unix shell-like parameter expansion/variable substitution via cross-platform CLI or Rust API

Safe Unix shell-like parameter expansion/variable substitution for those who need a more powerful alternative to envsubst but don't want to resort to

Isak Wertwein 4 Oct 4, 2022
A unix shell written in rust

rust-shell a unix shell written in rust Features Main features has .rc file (in ~/.rstshrc) has syntax highlighting fish-like autosuggestion emacs edi

matan h 4 Jan 10, 2023
🍬 shell-candy is a library that wraps Rust's `std::process::Command`

?? shell-candy is a library that wraps Rust's `std::process::Command`, providing a functional mechanism for handling stdout/stderr streams of spawned tasks..

Avery Harnish 6 Oct 25, 2022
Shell scripting that will knock your socks off

atom Shell scripting that will knock your socks off. NOTE: Click the image above for a video demonstration.

adam mcdaniel 256 Dec 14, 2022
A new type of shell

A new type of shell

Nushell Project 22.5k Jan 8, 2023
🐢 Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands

Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines, via an Atuin server.

Ellie Huxtable 4.6k Jan 1, 2023
A shell for research papers

Reason: A Shell for Research Papers Did I ever read this paper? Which OSDI 2021 papers did I read? Which ones have the word 'Distributed' in their tit

Jae-Won Chung 121 Nov 27, 2022
Explore from the safety of your shell

turtlescan Explore from the safety of your shell Installation: cargo install turtlescan tui Starts a little tui which connects to your JSON-RPC server

Brian Cloutier 4 Sep 13, 2022
dune - A shell by the beach!

dune - A shell by the beach!

adam mcdaniel 640 Dec 29, 2022
A command-line shell like fish, but POSIX compatible.

A command-line shell like fish, but POSIX compatible.

Seiya Nuta 813 Dec 29, 2022
Zash - A Zuper Awesome Shell

Zash - A Zuper Awesome Shell Welcome to zash, its activily being developed and is not near a stable release. Installation Arch: yay -S zash Paru seem

Robiot 27 May 22, 2022
A very opinionated, zero-configuration shell prompt

A very opinionated, zero-configuration shell prompt

amy null 8 Nov 4, 2021
An interactive shell environment for exploring the p2panda protocol

An interactive shell environment for exploring the p2panda protocol. Uses a mock node and clients to simulate network logic.

null 4 Dec 12, 2021
Self-contained template system with Handlebars and inline shell scripts

Handlematters Self-contained template system with Handlebars and inline shell scripts Introduction Handlematters is a template system that combines Ha

Keita Urashima 3 Sep 9, 2022