https://github.com/tsukinoko-kun/smash
super magical awesome shell
https://github.com/tsukinoko-kun/smash
interactive-shell shell shell-prompt
Last synced: about 1 year ago
JSON representation
super magical awesome shell
- Host: GitHub
- URL: https://github.com/tsukinoko-kun/smash
- Owner: tsukinoko-kun
- License: other
- Created: 2024-09-23T22:09:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-05T11:05:54.000Z (over 1 year ago)
- Last Synced: 2025-03-23T23:33:23.841Z (about 1 year ago)
- Topics: interactive-shell, shell, shell-prompt
- Language: Go
- Homepage: https://brew.frankmayer.dev/formula/smash/
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# smash
super magical awesome shell
Do **not** use this as your default shell (/bin/sh) because it is not POSIX compliant. Like fish, it is designed to be a user-friendly interactive shell. It is not designed to be a system shell that runs scripts.
Environment variables are loaded from your system default shell.
smash uses ANSI escape codes to format the prompt. If you are using a terminal that does not support ANSI escape codes, you will not be able to use smash.
There are some bugs on Windows because I don't use Windows. Feel free to open PRs to fix them.
## Features
- Substitute environment variables and ~
- Tab completion
- Configurable and interactive prompt
- Command history
- Command aliases
- Context prompt (e.g. git branch)
- Context aware completions
### Builtins
- `calc` (simple calculator)
- `cd` (change directory)
- `echo` (print arguments to stdout)
- `exit` (exit shell session)
- `printf` (print formatted string to stdout)
- `time` (time command execution)
- `zu` (change directory based on history and frequency, similar to [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide))
- `smashfetch` (show system information, similar to [dylanaraps/neofetch](https://github.com/dylanaraps/neofetch))
## Upcoming
- More configuration options
- More builtins
## Configuration
`~/.config/smash/config.toml`
- `ps1`: Prompt shown on user input
- `ps2`: Prompt shown on the executed commands
- `alias`: Map of command aliases where keys can be a string or list of strings
- `color`: Map of colors supporting all [charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) colors
- `completion_text`: text color of completion list
- `completion_selected_bg`: background color of selected completion entry
- `on_start`: List of commands to run on shell start
- `env`: Map of environment variables
## Install
```shell
brew install tsukinoko-kun/tap/smash
```
```shell
go install github.com/tsukinoko-kun/smash@latest
```