+
Skip to content

RomanKryvko/stush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stush


stush is a stupid shell. It was created as an educational project and you certainly don't want to run it as you login shell. Compliance with any existing standards is (at least for now) coincidental.

Features

Implemented:

  • Line editing (my own library)
  • Running scripts from files
  • Running external commands
  • Running shell builtins
  • Variable expansion (both shell and environment)
  • Tilde expansion
  • Glob expansion
  • Pipelines (| and |&)
  • Command lists (|| and &&)

Not (yet) implemented:

  • Line editing (using GNU readline or similar)
  • Shell configuration
  • Prompt customization
  • Command history
  • Multi-line commands
  • Brace expansion
  • Parameter expansion
  • Redirections and heredocs
  • Command substitution
  • Any kind of scripting language
  • Job control

Usage

Currently there are three ways to use stush:

  1. Interactive mode (default): simply run the stush executable.
  2. Running a command from command line args: stush -c 'command'
  3. Running script files:
    • stush <filename> - run file as stush script
    • Create a script with a shebang pointing to stush's location and run it Type help in interactive mode to get info on all shell builtins.

Building

cmake -S . -B build && cmake --build build Dependencies:

  • CMake (build)
  • GoogleTest (testing)

Platforms

Stush was developed on Linux and currently supports only it.

About

A simple shell created for educational purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载