Hack-ide is a project mainly written in PYTHON and VIM SCRIPT, based on the View license.
Content-type: text/html Man page of hackide
Section: USER COMMANDS (1)
Updated: June 12, 2011
Index Return to Main Contents
hackide - creates a persistent work environment in a terminal.
hackide
{-h|--help|help}
hackide
description-file
hackide test-layout
description-file
hackide
<context-template> <parameters...>
hackide files
description-file
hackide templates
When invoked with a single filename as argument,
hackide
builds or restores a tmux session from a work-context description file (see section
FILES
). In a session, a number of tasks are laid out in a single window by successively splitting panes. Each task runs one command repetitively, so the command will respawn if it quits. The tasks can define a number of resource files to store its state and achieve persistence.
hack-ide
can handle multiple windows, each with their own layout.
One can query the resource files related to a work-context by putting
files
before the description filename.
hackide
also defines task templates to simplify writing the work-context description files. Invoke with the single argument
templates
to view the existing templates, as well as the template directory.
This file contains five different types of lines :
context <context-name>
This line defines the context name, which will become the tmux session name.
task <name> => <template> [working-directory] [command-parameters]
This line declares a task.
<name>
may be followed (without SPACES !) by a comma-delimited list of rc
file definitions in the form
"rc:<key>:<filename>". This will create an empty resource file by the name filename and this file can be mentioned in the command parameters by writing "%key%".
embed <filename> <alias> <parameters...>
Embed another context inside this one. The contents of filename are expanded with a dictionary containing the alias name in
prefix
and positional arguments from
parameters
in
1, 2, 3...
(this is unbounded, if you provide 999 words on the parameter line, %999% will be defined) and the result is read like a .hackide file. You can then use the alias directly in the layout definition.
layout <layout-definition>
A layout consists of either horizontal or vertical splits of the terminal window. The syntax for a split is
( <first> <split-direction> <size-of-second-pane-in-%> <second> )
where
first
and
second
are either a task name or a split.
split-direction
is
|
for an horizontal split or
--
for a vertical split.
For instance, "(foo |50 (bar --50 baz))" creates a window with task
foo
in the left half and task
bar
on top of task
baz
in the right half.
window <window-name> <layout-definition>
Creates a secondary window named
window-name
And containing the specified layout. The initial window will be focused at startup.
Example:
context test
task editor => vim
task sandbox,rc:pyhist:sandbox.pyhistory => cmd ./py PYHISTORY=%pyhist% python -i sandbox.py
task shell => interactive_shell .
layout ((sandbox --90 shell) |90 editor)
Task templates contain three types of directives :
RC <key> <template_filename> (EMPTY|CONTENT)
Declares a resource file. When a task is created using this template, the
template_filename
is expanded using the dictionary of the task, that is :
{
'T':task_name,
'P':context_name,
'PARAM':task_parameter_string,
<any-rc-file-already-defined>
}
If the last word is CONTENT, the file will be initialized from the template expansion of all the following lines until the line "END <key> CONTENT", where <key> is still the same.
CMD ...
Sets the command template. Whatever is on the right of the space after "CMD" will be expanded using the task dictionary.
DOC
Starts the documentation bloc. This directive should appear only once. The documentation is displayed when
hack-ide templates
is invoked. Documentation ends with a line that contains "END DOC".
Call context templates from the commandline.
Sometimes when killing an interpreter the pane will die too. Need some \^D catching somewhere.
Damien "bl0b" Leroux (damien.leroux (at) gmail.com)
NAME SYNOPSYS DESCRIPTION FILES work-context description task template TODO BUGS AUTHOR
This document was created by man2html,
using the manual pages.
Time: 10:05:53 GMT, June 13, 2011