This commit is contained in:
2018-10-03 19:54:17 +04:00
parent 48017cb81c
commit 68bec0b2d4
2 changed files with 23 additions and 1 deletions

View File

@@ -54,3 +54,7 @@ alias -g LATEST='*(om[1])'
alias tmuxr="tmux new -ADs auto-session" alias tmuxr="tmux new -ADs auto-session"
alias FUNCTION_PRELUDE="setopt LOCAL_OPTIONS PIPE_FAIL XTRACE ERR_RETURN" 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"

View File

@@ -4,6 +4,24 @@ function is_local {
[[ "$HOSTNAME" =~ '^abra0' || "$HOSTNAME" == "svxf2-osx" ]] [[ "$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 publish {
FUNCTION_PRELUDE FUNCTION_PRELUDE