Skip to content

NotNekodev/jash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jash

Just Another SHell - A lightweight, customizable Unix shell

GitHub License GitHub Actions Workflow Status GitHub last commit GitHub commit activity GitHub Sponsors

Jash is a modern Unix shell designed for simplicity, performance and extensibility. It provides a familiar command-line interface while maintaining minimal dependencies and a small footprint.

Table of Contents

Overview

Jash (Just Another SHell) provides the essential functionality of Unix shells like Bash or Zsh while maintaining a clean, efficient codebase. It features command history, customizable prompts, and standard path resolution while using minimal dependencies.

System Requirements

Operating System Compatibility

Operating System Status
Linux
WSL2
Unix ⚠️
macOS ⚠️
Windows

✅ Fully supported and tested
⚠️ Should work but not extensively tested
❌ Not supported

Dependencies

  • libreadline-dev - For input handling and command history functionality
  • C compiler (clang or gcc) - For building the project
  • git - For cloning the repository (optional)

Installation

Building from Source

  1. Install required dependencies:
# Debian/Ubuntu
sudo apt install libreadline-dev clang git
   
# Fedora/RHEL
sudo dnf install readline-devel clang git
   
# Arch Linux
sudo pacman -S readline clang git
  1. Clone the repository:
git clone --depth 1 https://github.com/NotNekodev/jash.git
cd jash
  1. Build and install
make
sudo make install

This compiles Jash and installs it to /usr/bin/jash. The installation also adds Jash to you /etc/shells file.

Setting as Default Shell

To set Jash as your default login shell:

chsh -s /usr/bin/jash

Log out and log back in for the changes to take effect.

Features

  • Clean, minimal interface
  • Command history with persistence
  • Standard path resolution
  • Configurable via INI file
  • Extensible command completion

Configuration

Jash can be configured by creating or editing the .jashconf.inifile in your home directory.

Available Configuration Options

[Core] section

  • Prompt: Customizes the shell prompt with the following placeholders:

    • $$DIR$$: Current working directory
    • $$USER$$: Current username
    • $$HOST$$: Current hostname
  • HistorySize: The size of the command history before looping

  • HistoryFile: Where to store the command history. (Don't use '~')

  • DefaultDirectory: The default directory thats open when you launch the shell

  • MaxCommandSize: The maximum size for a command

  • StartupScript: The script to run on startup

[Cursor] section

  • Style: The cursor style. There are 4 possible options:
    • block: Block Cursor, the default one
    • underline: Underline Cursor
    • bar: A simple bar cursor
    • custom: uses the CustomSequence below to "print" the cursor configuration
  • BlinkEnables: When enabled the cursor will blink. Otherwise not
  • CustomSequence: What to print when the cursor configuration is custom (experts only)

[Completion] section

  • Enable: If set it will enable tab completion
  • CacheTTL: Time to live of the command cache in seconds

[Commands] section

  • XpgEcho: Enables bash like xpg_echo / Posixly correct echo
  • UseBuiltinEcho: If set it will not use the echo binary but a custom variant

Example Configuration

This configuration also represents the standart configuration if the file cannot be loaded

; Prompt variables:
;  - $$USER$$ - current user name
;  - $$HOST$$ - current host name
;  - $$DIR$$ - current directory

[Core]
Prompt=$$USER$$@$$HOST$$:$$DIR$$$
HistorySize=2048
HistoryFile=/home/neko/.jash_history
DefaultDirectory=~
MaxCommandSize=1024
StartupScript=~/.jashrc

[Cursor]
; Cursor style: block, underline, bar, custom
Style=block
BlinkEnabled=true

; Custom cursor settings (used when Style=custom)
CustomSequence=\033[3 q

[Completion]
Enable=true
CacheTTL=3600

[Commands]
UseBuiltinEcho=true
XpgEcho=false

Development

Jash is structured with a clean separation between core functionality components:

  • Input handling with readline integration
  • Command execution and process management
  • Configuration parsing with INI format
  • Command history management

To contribute to Jash, please fork the repository and submit pull requests with your changes.

License

Jash is licensed under the MIT License. See LICENSE for details.

Copyright © 2025 NotNekodev

About

Just another Shell. Written completly in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published