Simple aliases available in bash
It is very simple to use my-bash-alias
temporarily.
Just download and run the myalias.sh
.
For example,
-
Use
curl
to download, and runmyalias.sh
curl -o myalias.sh https://raw.githubusercontent.com/hmasdev/my-bash-alias/main/myalias.sh && . ./myalias.sh
-
Use
git
to download the scriptgit clone https://github.com/hmasdev/my-bash-alias.git && cd my-bash-alias && . ./myalias.sh
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. Then run the following command:
update_my_bash_alias
update_my_bash_alias
writes the latest version of 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
.
-
Fork the repository: https://github.com/hmasdev/my-bash-alias;
-
Clone the repository:
git clone https://github.com/{YOURE_NAME}/my-bash-alias cd my-bash-alias
-
Checkout your working branch:
git checkout -b your-working-branch
-
Make your changes;
-
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;
-
Test your changes with the followings:
for l in tests/*; do . $l; done
Executing the above command in an isolated environment like
docker
is highly recommended; -
Commit your changes:
git add . git commit -m "Your commit message"
-
Push your changes:
git push origin your-working-branch
-
Create a pull request: https://github.com/hmasdev/my-bash-alias/compare.