← Back

ash-shell

Lightweight and customizeable shell for Linux made in "C"

Source code

AUR version AUR votes License Top language Languages count Lines of code Repo size Last commit Commit activity Contributors Open issues Pull requests Releases GitHub stars GitHub forks GitHub watchers

Documentation

ash-shell is a linux shell designed for gnu/linux

⚠️warning:

this shell is full of buggs and in an early stage i don't recomend using it daily untill i make sure that it is safe enough to use, but feel free to use in a VM or in a test enviroment

features

POSIX-Compliant Core: The fundamental process management, I/O redirection, and signal handling are built on POSIX standards for reliability and portability.

Advanced Command Execution: Supports pipelines |, logical AND &&, logical OR || and running apps in the background &(buggy)

I/O Redirection: Handles input< and output >(buggy) and redirecting to a text file >>

Built-in Commands: Includes essential commands like cd, exit, history, help, jobs,fg, and bg(sometimes buggy)

Job Control:(bugged): manage em with jobs make em foreground fg and move em to background with bg

Configuration: Supports a customizable user experience through a startup script ~/.ashrc and a config file ~/.config/ash.conf

prompt: Displays the current working directory and a customizable icon based on your Linux distribution.


A screenshot of the ash-shell prompt
prompt
A screenshot of the ash-shell help command
help command

Alias Support: Define custom aliases in ~/.ashrc to simplify complex or frequently used commands.

alias <alias_name>='<command>'

Command History: Utilizes readline for a familiar interactive history and line editing experience, with history saved to ~/.ashhistory

Variable Support: Assign and expand shell variables.

how to script (so bugged)

You can write standard shell scripts and execute them with ash. The scripting syntax is highly compatible with other POSIX-compliant shells(kinda). warning⚠️: run the script inside the shell not outside of it like do ./script insted ash script cuss it will freak out

#!/bin/ash
# A simple example script for the ash shell.

# 1. Variable Assignment
# Sets the name of the log file we'll be working with.
LOG_FILE="script_output.log"
echo "Using log file: $LOG_FILE"

# 2. Command Execution and Output Redirection (>)
# Creates a new file and writes the first line to it.
echo "Starting script at $(date)" > "$LOG_FILE"

# 3. Appending to a file (>>)
# Adds a second line without overwriting the first one.
echo "---" >> "$LOG_FILE"
echo "This is a second line of text." >> "$LOG_FILE"

# 4. Pipelines (|)
# Lists files and pipes the output to grep to check for the log file.
echo
echo "Verifying file creation with a pipeline:"
ls -l | grep "$LOG_FILE"

# 5. Logical AND (&&)
# This command runs only if the previous grep command was successful.
grep "$LOG_FILE" "$LOG_FILE" && echo "File check successful!"

# 6. Basic command execution
# Displays the final contents of the log file.
echo
echo "Final contents of the log file:"
cat "$LOG_FILE"

# 7. Clean up
# Removes the created file.
rm "$LOG_FILE"
echo
echo "Script finished. File '$LOG_FILE' has been removed."

using ~/.ashrc

The ~/.ashrc file is executed every time the shell starts up. This is the ideal place to define aliases and set up your environment.

# Set aliases for common commands
alias ll='ls -alF'
alias h='history'
alias gcl='git clone'

# Add custom paths to the PATH environment variable
export PATH+=:/path/to/my/bin

Modifying ~/.config/ash.conf

# ash-shell configuration file
#
# first_time: Whether this is the first time running the shell.
#   - This is automatically set to true after the first run.
#
# hide_icon: Set to true to hide the Linux distro icon from the prompt.
#   - To hide the icon, change this to `hide_icon=true`.

first_time=true
hide_icon=false

contribute

fell free to contribute to this project in github

Install Options

Option 1 — pacman

install aserdev-repo and install with pacman

bash <(curl -fsSL https://raw.githubusercontent.com/aserdevyt/aserdev-repo/refs/heads/main/install.sh) && sudo pacman -Sy ash-shell

Option 2 — cmake

install cmake and compile in "C"

git clone https://github.com/aserdevyt/ash-shell.git && cd ash-shell && mkdir build && cd build && cmake .. && make && sudo make install

Screenshots / Logos

Screenshot-1
Screenshot
Screenshot-2
Screenshot
Screenshot-3
Screenshot