A Python-based shell with tab completion
Project description
Roysh - A Python-based Shell
Roysh is a simple yet powerful Python-based shell that provides familiar shell functionality with tab completion support.
Features
- Interactive command-line interface
- Tab completion for commands and file paths
- Built-in shell commands
- Command output redirection
- Path-based command execution
- Cross-platform support
Installation
Install using pip:
pip install roysh
Usage
Start the shell by running:
roysh
Built-in Commands
| Command | Description |
|---|---|
echo [text] |
Print text to stdout |
exit [code] |
Exit the shell (optional status code) |
type <command> |
Show command type/location |
pwd |
Print working directory |
cd [path] |
Change directory (defaults to HOME) |
Output Redirection
Roysh supports standard output redirection operators:
| Operator | Description |
|---|---|
> |
Redirect stdout to file (overwrite) |
>> |
Append stdout to file |
2> |
Redirect stderr to file (overwrite) |
2>> |
Append stderr to file |
Examples
# Basic command usage
$ echo Hello World
Hello World
# Working with directories
$ pwd
/home/user
$ cd /tmp
$ pwd
/tmp
# Output redirection
$ echo "log entry" >> log.txt
$ echo "error message" 2> errors.txt
# Command information
$ type echo
echo is a shell builtin
$ type python
python is /usr/bin/python
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Nishan Roy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roysh-0.1.tar.gz.
File metadata
- Download URL: roysh-0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a705bbd200c54dc5093ba69beba97fc2b3313dc3ad426e10a5f37de4cadcd8
|
|
| MD5 |
f77bcb84d86757cf56bce154c42c4610
|
|
| BLAKE2b-256 |
e5b3b32ec7ff2b9fd0685d46a106a644d67bada29bc584955296fc442c9b97c8
|
File details
Details for the file roysh-0.1-py3-none-any.whl.
File metadata
- Download URL: roysh-0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
275658f749e58601fd30502b1ab2cdd913a81739acd3549db03b76f9e65639bc
|
|
| MD5 |
a3df97fe7ea5457f508521134c5f4fd8
|
|
| BLAKE2b-256 |
93ad0f3a3c9d66c24a153c3453a94bac294cc4bed16340cee763688a44b645d4
|