alias xy_alias_version='echo xy_alias version 1.2'
alias xy_alias_url='echo https://gist.github.com/xy2z/0dad738b1519aed3f67613a6e9e2917a'
alias xy_alias_update_linux='wget -O ~/.bash_aliases https://gist.githubusercontent.com/xy2z/0dad738b1519aed3f67613a6e9e2917a/raw && source ~/.bash_aliases'
alias ll='ls -alh --show-control-chars -F --color $*'
alias gl='git log --oneline --all --graph --decorate $*'
alias gs='git status'
alias dc='sudo docker-compose'
alias ddrush='sudo docker-compose exec web vendor/bin/drush'
alias grep='grep --color=auto $*'
alias c='clear'
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias watch='watch -d -n 0.5'
WARNING: This will overwrite your current ~/.bash_aliases
file (if it exists). To see if it exists run cat ~/.bash_aliases
wget -O ~/.bash_aliases https://gist.githubusercontent.com/xy2z/0dad738b1519aed3f67613a6e9e2917a/raw && source ~/.bash_aliases
This will NOT overwrite your current aliases, cmder will overwrite the existing and add the new, and not delete your own aliases.
Requirements: PHP
php -r "echo str_replace(['alias ', '\''], '', file_get_contents('https://gist.githubusercontent.com/xy2z/0dad738b1519aed3f67613a6e9e2917a/raw'));" >> %CMDER_ROOT%\config\user_aliases.cmd
Restart cmder.exe.
Having multiple devices (home pc, home laptop, work pc, etc.) and servers it can be a difficult job to set all your own aliases, this is a way to fix that with one command that should be run on every device.
alias
xy_alias_version
Sometimes when running the install/update command, it will return a cached version if it's run multiple times. Wait ~5 minutes and try again. I've tried with wget --no-cache
but it didnt help, however it did work after a couple minutes.
xy_alias_update
alias that will run the script again? That will need some logic to know if the OS is linux or windows, so probably not since that would be a "function", and not sure that works in windows. So maybe a xy_alias_update_linux
and xy_alias_update_windows
command.xy_alias_update_linux
to the end of your ~/.bashrc
file. This will slow your login down a tiny bit, but then it will always be up to date.