Skip to content

hmasdev/my-bash-alias

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Bash Alias

GitHub top language GitHub tag (latest SemVer) GitHub GitHub last commit Scheduled Test

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

    curl -o myalias.sh https://raw.githubusercontent.com/hmasdev/my-bash-alias/main/myalias.sh && . ./myalias.sh
  • Use git to download the script

    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. 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.

How to Contribute

  1. Fork the repository: https://github.com/hmasdev/my-bash-alias;

  2. Clone the repository:

    git clone https://github.com/{YOURE_NAME}/my-bash-alias
    cd my-bash-alias
  3. Checkout your working branch:

    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:

    for l in tests/*; do . $l; done

    Executing the above command in an isolated environment like docker is highly recommended;

  7. Commit your changes:

    git add .
    git commit -m "Your commit message"
  8. Push your changes:

    git push origin your-working-branch
  9. Create a pull request: https://github.com/hmasdev/my-bash-alias/compare.

LICENSE

Authors

About

Simple aliases available in `bash`

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages