From f17bb45f06d7428b01bb7fc5e4dcd3c10bb7f2b1 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 4 Mar 2022 10:24:08 +0800 Subject: update --- alias | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'alias') diff --git a/alias b/alias index 50f994f..138677c 100644 --- a/alias +++ b/alias @@ -151,6 +151,18 @@ alias gls='git log -S' alias cdgg='cd $(git rev-parse --show-toplevel)' alias cdgw='cdgg && cd .github/workflows' alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule +check_repo() { + cd $1 + echo check $1 + git status -s + [[ -n $(git cherry origin) ]] 2>/dev/null && print "\e[31m[ahead]\e[0m" +} +check() { + check_repo $SETTING_DIR + check_repo $HOME/.password-store + check_repo $HOME/vimwiki +} +alias ch='check' # github export GITHUB_API='https://api.github.com' @@ -457,18 +469,13 @@ alias stew='cd ~/git/mapstew' alias tw='tiddlywiki' alias tw='tiddlywiki' alias vc='vultr-cli' -check_repo() { - cd $1 - echo check $1 - git status -s - [[ -n $(git cherry origin) ]] 2>/dev/null && print "\e[31m[ahead]\e[0m" +hugo(){ + docker run --rm \ + -u `id -u`:`id -g` \ + -v `pwd`:/src \ + klakegg/hugo \ + $@ } -check() { - check_repo $SETTING_DIR - check_repo $HOME/.password-store - check_repo $HOME/vimwiki -} -alias ch='check' TAIWAN_BBOX='118.1036,20.72799,122.9312,26.60305' TAIWAN_BBOX_V='20.72799,118.1036,26.60305,122.9312' -- cgit v1.2.3-70-g09d2