Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tetsuo-cpp/tsh
Tetsuo's Shell (Tsh).
https://github.com/tetsuo-cpp/tsh
Last synced: 16 days ago
JSON representation
Tetsuo's Shell (Tsh).
- Host: GitHub
- URL: https://github.com/tetsuo-cpp/tsh
- Owner: tetsuo-cpp
- Created: 2019-01-24T11:41:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-17T06:21:10.000Z (over 5 years ago)
- Last Synced: 2024-12-19T06:45:28.926Z (about 1 month ago)
- Language: C
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tetsuo's Shell (Tsh)
This is a toy shell I wrote to become more familar with C.
## Features
* Interactive commands (less, vi, etc).
* Piping.
* I/O redirection.
* Using environment variables as args.
* Records command duration with SQLite (because why not).
* Shell history.
## Improvements
* File globbing.
* More granular I/O redirection (choosing between stdout and stderr).
* More operators.
* Job control.
* Make less buggy.
## Dependencies
* CMake.
* GNU ReadLine.
* SQLite Version 3.
* Attractive Chaos' Klib.
## Build
Bring in Git submodules.
```
git submodule init
git submodule update
```
Run ```build.sh``` to invoke the CMake build.
```
sh build.sh [BUILD_TYPE:debug/release/asan/ubsan/scan]
```
## Usage
To execute a single command.
```
build/[BUILD_TYPE]/tsh [COMMAND]
```
To run Tsh as the active shell (Ctrl-D to exit).
```
build/[BUILD_TYPE]/tsh
```
To run an Address Sanitized build.
```
ASAN_OPTIONS="symbolize=1" build/asan/tsh
```
To run an Undefined Behaviour Sanitized build.
```
UBSAN_OPTIONS="print_stacktrace=1" build/ubsan/tsh
```
## Built-in commands
* ```cd```: Change current working directory.
* ```help```: Display help text.
* ```exit```: Exit the shell.
* ```tshstats```: Display command duration information (backed by SQLite).
* ```history```: Display the shell history (backed by SQLite).