Safe Haskell | None |
---|
Lets you quickly run ssh on a machine that you have an sshfs connection
to. It works out the username, host and the directory on the host based
on the current directory and the output of mount
- data MountPoint = MountPoint {
- remoteUser :: Text
- remoteHost :: Text
- remoteDir :: FilePath
- localDir :: FilePath
- parseMountPoint :: String -> Maybe MountPoint
- getMountPoint :: FilePath -> IO (Either MountPoint String)
- data MountSettings = MountSettings {}
- readSettings :: IO [MountSettings]
- defMountSettings :: IO MountSettings
- vado :: MountPoint -> [MountSettings] -> FilePath -> [String] -> FilePath -> [String] -> IO [String]
- vamount :: MountSettings -> FilePath -> FilePath -> [String] -> [String]
Documentation
data MountPoint Source
Remote file system mount point
MountPoint | |
|
:: String | line of output fromt he |
-> Maybe MountPoint |
Parses a line looking for a remote mount point
:: FilePath | Local directory to find the mount point |
-> IO (Either MountPoint String) | Details of the mount point or an error string |
Run mount
and look up the mount point relating to the
directory in the output
data MountSettings Source
Mount point settings
readSettings :: IO [MountSettings]Source
Read a list of predefined mount points from the ~/.vadosettings files
defMountSettings :: IO MountSettingsSource
Default mount settings for vagrant
:: MountPoint | Mount point found using |
-> [MountSettings] | SSH settings from the '.vadosettings' files |
-> FilePath | Local directory you want the command to run in.
Normally this will be the same directory
you passed to |
-> [String] | Options to pass to ssh. If the mount point is 'vagrant@127.0.0.1' then the most common vagrant connection options ('-p2222' and '-i~/.vagrant.d/insecure_private_key') are included automatically |
-> FilePath | Command to run |
-> [String] | Arguments to pass to the command |
-> IO [String] | Full list of arguments that should be passed to ssh |
Get a list of arguments to pass to ssh to run command on a remote machine in the directory that is mounted locally
:: MountSettings | Mount settings to use |
-> FilePath | Remote directory to mount |
-> FilePath | Local directory (where to mount) |
-> [String] | Other options to pass to sshfs |
-> [String] | Resulting list of arguments |
Get a list of arguments to pass to sshfs to mount a remote filesystem in the given directory