control.commands documentation

A set of DSL for ssh, inspired by Fabric

append

(append file line & opts)
Append a line to a file

cat

(cat file)
cat a file

cd

(cd path & cmd)
change current directory

chmod

(chmod mod file)
chmod [mod] [file]

comm

(comm file pat & opts)
Comments a line in a file with special character,default :char is "#"
It use sed function to replace the line matched pattern, :sudo is also valid

env

(env key val & cmd)
declare a env variable for next command

path

(path new-path & cmd)
modify shell path

prefix

(prefix pcmd & cmd)
execute a prefix command, for instance, activate shell profile

run

(run & cmds)
simply run several commands

sed

(sed file before after & opts)
Use sed to replace strings matched pattern with options.Valid options include:
:sudo   =>  true or false to use sudo,default is false.
:flags   => sed options,default is nil.
:limit    =>  sed limit,default is not limit.
:backup  => backup file posfix,default is ".bak"
Equivalent to sed -i<backup> -r -e "/<limit>/ s/<before>/<after>/<flags>g <filename>".

sudo

(sudo cmd)
run a command with sudo

uncomm

(uncomm file pat & opts)
uncomment a line in a file