diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2022-11-18 10:32:53 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2022-11-18 10:32:53 +0800 |
| commit | 65d008feebb024b21b75f1901d55605d8448cd66 (patch) | |
| tree | 2dd0ba85a403eead37f48d88ce45e70363f1a530 /alias | |
| parent | 9134283c801da59c3236f90a70bd82d1a9dbffe3 (diff) | |
Refactor alias 'ch'
Diffstat (limited to 'alias')
| -rw-r--r-- | alias | 19 |
1 files changed, 2 insertions, 17 deletions
| @@ -72,6 +72,7 @@ alias gg='gist grep' | |||
| 72 | 72 | ||
| 73 | # unix | 73 | # unix |
| 74 | alias chx='chmod +x' | 74 | alias chx='chmod +x' |
| 75 | alias chr='chmod +r' | ||
| 75 | alias s='sudo systemctl' | 76 | alias s='sudo systemctl' |
| 76 | alias j='sudo journalctl -xe' | 77 | alias j='sudo journalctl -xe' |
| 77 | alias ju='sudo journalctl -u' | 78 | alias ju='sudo journalctl -u' |
| @@ -222,23 +223,7 @@ alias gls='git log -S' | |||
| 222 | alias cdgg='cd $(git rev-parse --show-toplevel)' | 223 | alias cdgg='cd $(git rev-parse --show-toplevel)' |
| 223 | alias cdgw='cdgg && cd .github/workflows' | 224 | alias cdgw='cdgg && cd .github/workflows' |
| 224 | alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule | 225 | alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule |
| 225 | check_repo() { | 226 | alias ch="/home/pham/helper/tools/git/check-repos.sh" |
| 226 | cd $1 2>/dev/null || return 0 | ||
| 227 | echo check $1 | ||
| 228 | git status -s | ||
| 229 | [[ -n $(git cherry ${2:-origin}) ]] 2>/dev/null && print "\e[31m[ahead]\e[0m" | ||
| 230 | } | ||
| 231 | check() { | ||
| 232 | DIR=`pwd` | ||
| 233 | check_repo $SETTING_DIR | ||
| 234 | check_repo $HOME/.password-store | ||
| 235 | check_repo $HOME/log | ||
| 236 | check_repo $HOME/.task | ||
| 237 | check_repo $HOME/bean | ||
| 238 | check_repo $HOME/.vim/vim-init vps | ||
| 239 | cd $DIR | ||
| 240 | } | ||
| 241 | alias ch='check' | ||
| 242 | 227 | ||
| 243 | # github | 228 | # github |
| 244 | export GITHUB_API='https://api.github.com' | 229 | export GITHUB_API='https://api.github.com' |