Just Another Dumb SHell
Experiments with making a really dumb, slow shell in Python. This will never be usable. Heck you probably shouldn't even look at it. But, I'm making it.
Zero dependencies. Built entirely using Python stdlib and escape sequences.
- Python 2.7+
- Unix terminal with ANSI escape code support
Install the shell on your machine.
python setup.py install
Launch the shell.
Setting up your development environment requires a few extra steps.
virtualenv venv source venv/bin/activate pip install -r requirements.txt python setup.py develop
Now the application is installed locally and you can continue to make changes without reinstalling.
Launch the shell.
Alternatively you can launch the shell as a direct module:
python -m jadsh
Testing is an important part of ensuring program stability. Individual tests are located in the
Run all tests:
python -m unittest discover
Run an individual test suite (for example test_shell.py):
python -m unittest jadsh.tests.test_shell
When you start jadsh, you should see this:
Welcome to jadsh, Just Another Dumb SHell Type help for instructions on how to use jadsh you@hostname:~:$
Shells work by giving them commands. Using jadsh is no different.
A command is executed by typing the name of the command, then a set of arguments to pass to the command.
echo "hello world"
This calls the
echo command and passes the argument
"hello world". The result is the text
"hello world" being output to the screen. All commands in jadsh follow this simple syntax.
Any program on your computer can be executed this way. As long as it exists in the
PATH, you can call it.
Some examples include:
- ls - list the files and directories in your current working directory
- cd - change the current working directory of jadsh
- echo - output a set of arguments to the shell
- mv - move or rename a set of files
Go to the wiki for additional documentation.
Tested on Ubuntu 16.04. Should support any unix terminal with ANSI escape code support.
© Bradley Rosenfeld
Licensed under the MIT license