vado-0.0.2: Runs commands on remote machines using ssh

Safe HaskellNone



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 Source

Remote file system mount point




remoteUser :: Text

Account used on remote machine

remoteHost :: Text

Host name or address of the remote machine

remoteDir :: FilePath

Directory on remote machine

localDir :: FilePath

Where it is mounted on this machine

parseMountPoint Source


:: String

line of output fromt he mount command

-> Maybe MountPoint 

Parses a line looking for a remote mount point

getMountPoint Source


:: 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 MountSettings Source

Default mount settings for vagrant

vado Source


:: MountPoint

Mount point found using getMountPoint

-> [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 getMountPoint. The vado will run the command in the remote directory that maps to this one.

-> [String]

Options to pass to ssh. If the mount point is 'vagrant@' 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

vamount Source


:: 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