你最喜欢的 Bash 别名是什么?
你最喜欢的 Bash 别名是什么?
GitHub
上传
由 Mux 主办的 DEV 全球展示挑战赛:展示你的项目!
你最喜欢的 Bash 别名是什么?
我每天都会用到很多 Bash 别名!我喜欢这种可以将命令和操作打包到一个别名下,并通过如此简单的步骤提高工作效率的方式!
以下是我最喜欢的:
# ------------- MAINTENANCE ALIASES ----------------
alias update='sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt autoremove -y'
# --------------- PHP/NPM ALIASES ------------------
alias artisan='php artisan'
alias serve='php artisan serve'
alias unit='./vendor/bin/phpunit'
alias unitwatch='./vendor/bin/phpunit-watcher watch'
alias coverage='php -d pcov.enabled=1 ./vendor/bin/phpunit --coverage-html coverage'
alias cov-watcher='php -d pcov.enabled=1 ./vendor/bin/phpunit-watcher watch --coverage-html coverage'
alias prod='npm run prod'
alias dev='npm run dev'
alias watch='npm run watch'
# ----------------- GIT ALIASES --------------------
alias status='git status'
alias add-all='git add .'
alias gpm='git pull origin master'
alias push='git push origin'
alias pull='git pull origin'
alias switch='git checkout'
alias remove='git branch -d'
alias branches='git branch'
alias tags='git tag'
alias create-tag='git tag -a'
# ----------------- FILE ALIASES -------------------
alias editrc='nano ~/.bashrc'
alias applyrc='source ~/.bashrc'
你的呢?
文章来源:https://dev.to/roelofjanelsinga/what-are-your-favorite-bash-aliases-2h26