Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wynwxst/ash
Ash shell
https://github.com/wynwxst/ash
Last synced: 8 days ago
JSON representation
Ash shell
- Host: GitHub
- URL: https://github.com/wynwxst/ash
- Owner: wynwxst
- Created: 2022-03-28T05:20:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T03:36:31.000Z (almost 3 years ago)
- Last Synced: 2024-11-13T04:34:06.823Z (2 months ago)
- Language: Python
- Size: 11.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ASH
### Installation:
Make sure to install python then:
```bash
git clone https://github.com/n30nyx/ash
cd ash && python3 ash.py
```### Coreutils:
There are a few pre-prepared coreutils, add them to the symlinks yourself if you wish to use them### From a file:
`python3 ash.py `if the file does not end with `.ash`
ash will search for the file + `.ash`
### Usage:
There are several builtins into ASHThese include:
```
# for comments (not a builtin but a general purpose utility)
# most builtins start with `@` (except for exit and quit)
@bash echo hi
# or
@cmd echo hi
# each is adjusted accordingly for your os so you can run both without needing to change, pick which one is easist for you
@echo hi
# or
@print hi
# both are exactly the same again
@export myglobalvalue hello world
# this will set the global value of `myglobalvalue` to `hello world`
# or
@global myglobalvalue hello world
# You can use globals through the following:
%myglobalvalue%
# basically any line with the identifier will be set with the global value
# for configuring ash:
# @ashrc
# for example:
@ashrc startup echo ASH - Ashes dust to dust
#or for creating a symlink:
# @ashrc !add:symlinks
# for example:
@ashrc !add:symlinks /home/runner/ash/test_bin
# remember, your symlinks CANNOT end with a `/`
# set a prefix instead of ~
@ashrc prefix `~> `
#NOTE: you don't have to include the `, that was just to show the space
# Reset a value:
@ashrc !del:prefix
# You may also use @config as an alias of @ashrc
@reload
# reload the ash shell after making a change to the code
# set local variables:
$myvar = hello
# also use operations
$myvar += world```
Executing scripts:
```
# for .bat or .sh files, it will be automated eg.
test
# if test.sh/bat is there, it will run
# if a file is in one of the symlinks, let's use `test_bin/` as an example
test.py
# test.py would run
# to run a specific local file, with no autocorrect, simply type:
#./
#eg:
./todo.txt
```
### Exiting Ash:
```
# exit (by default status will be `0`)
# quit is an alias of exit
# exit 9 (for a special status)
# or
exit
```### Todo:
- Add .ash file support
- Package shell properly
- Add download coreutils
- Add `@pkg`
- @update