https://github.com/hmasdev/my-bash-alias
Simple aliases available in `bash`
https://github.com/hmasdev/my-bash-alias
Last synced: 6 months ago
JSON representation
Simple aliases available in `bash`
- Host: GitHub
- URL: https://github.com/hmasdev/my-bash-alias
- Owner: hmasdev
- License: mit
- Created: 2024-02-18T15:12:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T13:13:01.000Z (over 1 year ago)
- Last Synced: 2024-12-29T14:34:50.524Z (over 1 year ago)
- Language: Shell
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My Bash Alias





Simple aliases available in `bash`
## How to Use
### Temporary Use
It is very simple to use `my-bash-alias` temporarily.
Just download and run the `myalias.sh`.
For example,
- Use `curl` to download, and run `myalias.sh`
```bash
curl -o myalias.sh https://raw.githubusercontent.com/hmasdev/my-bash-alias/main/myalias.sh && . ./myalias.sh
```
- Use `git` to download the script
```bash
git clone https://github.com/hmasdev/my-bash-alias.git && cd my-bash-alias && . ./myalias.sh
```
### Permanent Use
If you want to use permanently the aliases in `myalias.sh`,
download the `myalias.sh` and add its content to `~/.bashrc`.
First, you should follow [Temporary Use](#temporary-use).
Then run the following command:
```bash
update_my_bash_alias
```
`update_my_bash_alias` writes [the latest version of `myalias.sh`](https://raw.githubusercontent.com/hmasdev/my-bash-alias/main/myalias.sh) into update `~/.bashrc`.
Note that `update_my_bash_alias` uses 2 comments, `######StartMyBashAlias######` and `#####EndMyBashAlias######` to identify the section to update.
So you should NOT use these comments in `~/.bashrc`.
## How to Contribute
1. Fork the repository: [https://github.com/hmasdev/my-bash-alias](https://github.com/hmasdev/my-bash-alias);
2. Clone the repository:
```bash
git clone https://github.com/{YOURE_NAME}/my-bash-alias
cd my-bash-alias
```
3. Checkout your working branch:
```bash
git checkout -b your-working-branch
```
4. Make your changes;
5. Add tests for your changes. Note that the prefix of the test workspace should be "test-". See './tests/test_basic_alias.sh' as an example;
6. Test your changes with the followings:
```bash
for l in tests/*; do . $l; done
```
Executing the above command in an isolated environment like `docker` is highly recommended;
7. Commit your changes:
```bash
git add .
git commit -m "Your commit message"
```
8. Push your changes:
```bash
git push origin your-working-branch
```
9. Create a pull request: [https://github.com/hmasdev/my-bash-alias/compare](https://github.com/hmasdev/my-bash-alias/compare).
## LICENSE
- [MIT](./LICENSE)
## Authors
- [hmasdev](https://github.com/hmasdev)