API for control.commands - control

by Sun Ning <classicning@gmail.com> Dennis Zhuang<killme2008@gmail.com>

Full namespace name: control.commands

Overview

A set of DSL for ssh, inspired by Fabric,
please see https://github.com/killme2008/clojure-control/wiki/commands

Public Variables and Functions



append

function
Usage: (append file line & opts)
Append a line to a file


cat

function
Usage: (cat file)
cat a file


cd

macro
Usage: (cd path & cmd)
change current directory


chmod

function
Usage: (chmod mod file)
chmod [mod] [file]


comm

function
Usage: (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

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


path

macro
Usage: (path new-path & cmd)
modify shell path


prefix

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


run

function
Usage: (run & cmds)
simply run several commands


sed

function
Usage: (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

macro
Usage: (sudo cmd)
run a command with sudo


uncomm

function
Usage: (uncomm file pat & opts)
uncomment a line in a file
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.