2013-04-29 13:38:49 -04:00
|
|
|
function g {
|
|
|
|
if [[ $# > 0 ]]; then
|
|
|
|
git $@
|
|
|
|
else
|
|
|
|
git status
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
compdef g=git
|
|
|
|
|
2013-05-28 23:32:51 -04:00
|
|
|
insert-sudo() {
|
|
|
|
zle beginning-of-line
|
|
|
|
zle -U "sudo "
|
|
|
|
}
|
|
|
|
|
2013-05-28 22:25:28 -04:00
|
|
|
function port-forward {
|
2013-05-28 23:32:51 -04:00
|
|
|
ssh $1 -R $2":localhost:"$2 -g
|
2013-05-28 22:25:28 -04:00
|
|
|
}
|
|
|
|
|
2013-06-11 16:45:08 -04:00
|
|
|
function map-sshfs {
|
2013-09-18 21:08:28 -04:00
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
echo Usage: map-sshfs HOST DIRECTORY MOUNT
|
|
|
|
else
|
|
|
|
sshfs -o idmap=user -o workaround=rename $USER'@'$1':'$2 $HOME'/Mounts/'$3
|
|
|
|
fi
|
2013-06-11 16:45:08 -04:00
|
|
|
}
|