Safe Haskell | Safe |
---|---|
Language | Haskell98 |
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
Synopsis
- 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 | |
|
Instances
Eq MountPoint Source # | |
Defined in System.Process.Vado (==) :: MountPoint -> MountPoint -> Bool # (/=) :: MountPoint -> MountPoint -> Bool # | |
Ord MountPoint Source # | |
Defined in System.Process.Vado compare :: MountPoint -> MountPoint -> Ordering # (<) :: MountPoint -> MountPoint -> Bool # (<=) :: MountPoint -> MountPoint -> Bool # (>) :: MountPoint -> MountPoint -> Bool # (>=) :: MountPoint -> MountPoint -> Bool # max :: MountPoint -> MountPoint -> MountPoint # min :: MountPoint -> MountPoint -> MountPoint # | |
Show MountPoint Source # | |
Defined in System.Process.Vado showsPrec :: Int -> MountPoint -> ShowS # show :: MountPoint -> String # showList :: [MountPoint] -> ShowS # |
:: 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
Instances
Read MountSettings Source # | |
Defined in System.Process.Vado readsPrec :: Int -> ReadS MountSettings # readList :: ReadS [MountSettings] # | |
Show MountSettings Source # | |
Defined in System.Process.Vado showsPrec :: Int -> MountSettings -> ShowS # show :: MountSettings -> String # showList :: [MountSettings] -> ShowS # |
readSettings :: IO [MountSettings] Source #
Read a list of predefined mount points from the ~/.vadosettings files
defMountSettings :: IO MountSettings Source #
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