Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roysh-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roysh-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file roysh-0.1.2.tar.gz.

File metadata

  • Download URL: roysh-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for roysh-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ab25624c1cc91581b91f870c7c4141f901938abce00f54ff9450fa7a02456740
MD5 bbaa9f11838a70bcc662c5058fff225f
BLAKE2b-256 5ba99a20a0ba21d794a88ccfe8d5cb1315547cd384aacceb27c0e825c49a1131

See more details on using hashes here.

File details

Details for the file roysh-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: roysh-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for roysh-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f242e22eafc3695cb7d0c24ed0c3325a4cb2b3e5b87385835fa51c12e33a2eb3
MD5 d76001addc454cea1b026ea858413d78
BLAKE2b-256 ef4dbd6c2a2c78891b0a86ec25efc69599501e26240a45dcd196839ff0d80ef5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page