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.1.tar.gz (5.1 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.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: roysh-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 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.1.tar.gz
Algorithm Hash digest
SHA256 f09047240f44f914b1c102c3e72b6a4ff1c846d64ae9df4474574c0bacf4f372
MD5 ee20fd3c9b1aabf48858f09e601fffa1
BLAKE2b-256 7891869b5c244bbf2b88bcae6974d2aef1358324843dc2bb15bd7599230e6fbf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: roysh-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0141da0d026d21c941dce510529497e78be64300d94016ebec668b1ed29f2057
MD5 34bc7750d8d8d71899128e137138a7c8
BLAKE2b-256 27a92048784f0ff7149ccd436bdebd7a29848aec4342a6ce38c94a339b61ebfc

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