A list of aliases and functions that you can use in bash, zsh, ...
- Fork this repo and clone it on your system
- Create a 2nd branch for yourself:
git checkout -b myownversion - Change the file
aliasesto your likings and rungit commit -v -a -m "My aliases and functions" - Place your version online:
git push --set-upstream origin myownversion - Add my repo as upstream:
git remote add upstream https://github.com/ngaro/aliases.git - Place the line
source /PATH_OF_THE_REPO/aliasesat the end of your.bashrc(or.zshrcwhen using zsh)
- Clone your repo:
git clone [email protected]:YOURGITUSERNAME/aliases.git - Switch the branch to your own version of the aliases and functions:
git checkout myownversion - Repeat the last 3 steps from Suggested installation
- From time to time run
git fetch --all ; git diff master upstream/master - Add the ones you like to your own aliases file (see Adding new aliases and functions only for yourself)
- Update your master branch:
git checkout master ; git merge upstream/master ; git checkout myownversion
You can:
- Turn off vars, aliases and functions with respectively
unset SOMEVAR,unalias somealiasandunset -f somefunction - Add or overwrite variables with
SOMEVAR=some_new_value
2 Variables that you probably already want to change:GITHUBUSERandGITLABUSER - Add or overwrite aliases with
alias somealias='some_new_command' - Add or overwrite functions with
function somefunction() { some; new; code; }
- Put them in your aliases file and run
git commit -v -a -m "Description of the changes" ; git push - Run
git fetch --all ; git merge origin/myversionon all your other systems
- Create a branch for a pullrequest:
git checkout master ; git checkout -b pr1 - Describe the alias(es) correctly and run
git commit -v -a m "names of the aliases and functions" ; git push
Make sure that you mention: ** What your aliases and functions do ** What arguments can/should be given to the alias (if this is the case) ** The shells(s) that you've tested them in ** Extra software needed (if this is the case) ** Anything the user should be careful for (if this is the case) - Put the branch online:
git push --set-upstream origin pr1 - Press Compare and send pull request on github
- Switch back to your own branch:
git checkout myversion
If you want to send extra pr's before your others have been closed/merged, use the same procedure but use the names pr2, pr3, ...
If you are not 100% sure that your aliases and functions will all be added send them as seperate pull-requests.
Everything in this readme still holds, but:
- You have to replace github by gitlab everywhere
- The button Compare and send pull request is named Create merge request