https://github.com/bonniss/aliash
Handy alias snippets to use instantly on a, for example, new server.
https://github.com/bonniss/aliash
Last synced: about 1 month ago
JSON representation
Handy alias snippets to use instantly on a, for example, new server.
- Host: GitHub
- URL: https://github.com/bonniss/aliash
- Owner: bonniss
- Created: 2024-06-14T18:29:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-17T06:45:38.000Z (11 months ago)
- Last Synced: 2025-03-20T08:48:23.894Z (about 1 month ago)
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# "Aliash"
Handy alias snippets to use instantly on a, for example, new server.
## How to use
`.bash_aliases` includes ones for:
- Bash (certainly)
- Git: mainly aligned to [gitalias](https://github.com/GitAlias/gitalias)
- Docker: mainly inspired by [tcnksm/docker-alias](https://github.com/tcnksm/docker-alias)```sh
curl https://raw.githubusercontent.com/bonniss/aliash/master/.bash_aliases -o ~/.bash_aliases# Check if already appear in `.bashrc`
# Run only once to avoid pollution to `.bashrc`
cat << EOF >> ~/.bashrc
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
EOFsource ~/.bashrc
```## FAQ
### `.bashrc` is not sourced on ssh 'command'?
[`.bashrc` is not sourced when you log in using SSH](https://stackoverflow.com/a/820533). You need to source it in your `.bash_profile`:
```sh
cat << EOF >> ~/.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
EOF
```## Bonus
Use [liquidprompt](https://liquidprompt.readthedocs.io/) for better bash prompt with Git. `liquidprompt` is [available as packages on various platforms](https://liquidprompt.readthedocs.io/en/stable/install/packages.html). Example command to install on Debian (Ubuntu).
```sh
apt-get install liquidprompt# Check if already appear in `.bashrc`
# Run only once to avoid pollution to `.bashrc`
liquidprompt_activatesource ~/.bashrc
```
## Useful resources
- [Mathias Bynens' dotfiles](https://github.com/mathiasbynens/dotfiles)
- [wrfly/bash_aliases](https://github.com/wrfly/bash_aliases)
- [gitkurwa](https://github.com/jakubnabrdalik/gitkurwa): List of aliases for long, long git commands.
- [magicmonty/bash-git-prompt](https://github.com/magicmonty/bash-git-prompt)
- [twolfson/sexy-bash-prompt](https://github.com/twolfson/sexy-bash-prompt)
- [arialdomartini/oh-my-git](https://github.com/arialdomartini/oh-my-git)