This commit is contained in:
2018-10-05 00:29:25 +04:00
parent 68bec0b2d4
commit 1a780986b6
2 changed files with 29 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ alias -g LATEST='*(om[1])'
#alias nika_pop="echo \"afplay ~/tmp/nika.mp3\" > ~/reverse_shell"
# remote tmux on server
alias tmuxr="tmux new -ADs auto-session"
alias tmuxr="tmux new-session -A -s auto"
alias FUNCTION_PRELUDE="setopt LOCAL_OPTIONS PIPE_FAIL XTRACE ERR_RETURN"
alias FUNCTION_PRELUDE_NO_XTRACE="setopt LOCAL_OPTIONS PIPE_FAIL ERR_RETURN"

View File

@@ -4,6 +4,30 @@ function is_local {
[[ "$HOSTNAME" =~ '^abra0' || "$HOSTNAME" == "svxf2-osx" ]]
}
function mount_sshfs {
FUNCTION_PRELUDE
if [[ ( -z $1 ) || ( -z $2 ) ]]; then
echo ':('
return 1
fi
local MOUNTPATH="/Users/abra/mount/$1"
mkdir -p "$MOUNTPATH"
umount "$MOUNTPATH" || true;
sshfs \
-o allow_other \
-o defer_permissions \
-o cache=yes \
-o Compression=no \
-o reconnect \
-o workaround=rename \
"$1:$2" "$MOUNTPATH"
}
function mkcd {
FUNCTION_PRELUDE_NO_XTRACE
@@ -216,4 +240,8 @@ function update_.g {
echo
zshreload
fi
}
function .sh_setup {
echo 'wget abra.me/.sh && chmod +x .sh && ./.sh'
}