Răsfoiți Sursa

Update superduper mountremote script with @pibis 😎

Kevin Heinicke 7 ani în urmă
părinte
comite
f564414390
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      zshrc

+ 3 - 1
zshrc

@@ -34,7 +34,7 @@ printable-code()
   echo $doc | pandoc -o "$name.$oformat"
 }
 
-# mount a remote's ($1) host dir ($2) at /MountPoint/$1
+# mount a remote's ($1) host dir ($2) at $3/$2 or ~/mounts/$2 if $3 is not set
 mountremote () {
   # set the root mount dir
   mountroot="${3:-$HOME/mounts}";
@@ -45,6 +45,8 @@ mountremote () {
   fi
   mkdir -p $mountroot
   sshfs $1:$2 "$mountroot/$mountpoint" -o auto_cache,reconnect,volname=$mountpoint,no_readahead,noappledouble,nolocalcaches
+  unset mountroot
+  unset mountpoint
 }
 
 # use the symlinked ssh-auth-sock if available