diff --git a/.zprezto/abra/aliases.zsh b/.zprezto/abra/aliases.zsh index 5a5c1c9..0d4b417 100644 --- a/.zprezto/abra/aliases.zsh +++ b/.zprezto/abra/aliases.zsh @@ -54,3 +54,7 @@ alias -g LATEST='*(om[1])' alias tmuxr="tmux new -ADs auto-session" alias FUNCTION_PRELUDE="setopt LOCAL_OPTIONS PIPE_FAIL XTRACE ERR_RETURN" +alias FUNCTION_PRELUDE_NO_XTRACE="setopt LOCAL_OPTIONS PIPE_FAIL ERR_RETURN" + +# pottering recommendation +alias psc="ps xawf -eo pid,user,cgroup,args" diff --git a/.zprezto/abra/functions.zsh b/.zprezto/abra/functions.zsh index 7abad8f..9ec4dbf 100644 --- a/.zprezto/abra/functions.zsh +++ b/.zprezto/abra/functions.zsh @@ -1,9 +1,27 @@ function is_local { local HOSTNAME="$(hostname)" - + [[ "$HOSTNAME" =~ '^abra0' || "$HOSTNAME" == "svxf2-osx" ]] } +function mkcd { + FUNCTION_PRELUDE_NO_XTRACE + + if [[ -z $1 ]]; then + echo ':(' + return 1 + fi + + if [[ -e $1 ]]; then + echo "file exists" + return 1 + fi + + mkdir $1 + + cd $1 +} + function publish { FUNCTION_PRELUDE