stuff
This commit is contained in:
@@ -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"
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user