## Save
$> ticat <command-1> : <command-2> : flow.save <command-save-path>
## Call
$> ticat <command-save-path>
## Examples:
$> ticat dummy : dummy : flow.save dummy.2
$> ticat dummy.2
$> ticat sleep 1s : dummy.2 : echo hello
The flows from repos added by "hub.add" or "hub.add.local" will be not listed:
$> ticat flow.list
$> ticat f.ls
## Command `flow` == `flow.list`
$> ticat f
## Add help
$> ticat flow.help <command-saved-path>
## Examples:
$> ticat flow.help dummy.2 "just a simple test of flow"
## Add abbrs
(TODO: implement, for now we could manually edit the flow file)
The saved file dir is defined by env key "sys.paths.flows",
the file name is <command-path>
plus suffix .flow.ticat
.
The file format:
- Share the same format with
mod meta
file except. - Use key
flow
instead ofcmd
in meta file, the value is the content of flow. - Template format
[[env-key]]
can be used in the content of flow, will be rendered into env value when executing.
## Overview
$> ticat cmds.tree.simple flow
[flow]
'list local saved but unlinked (to any repo) flows'
[save]
'save current cmds as a flow'
[set-help-str]
'set help str to a saved flow'
[remove]
'remove a saved flow'
[list-local]
'list local saved but unlinked (to any repo) flows'
[load]
'load flows from local dir'
[clear]
'remove all flows saved in local'
[move-flows-to-dir]
'move all saved flows to a local dir (could be a git repo).
auto move:
* if one (and only one) local dir exists in hub
* and the arg "path" is empty
then flows will move to that dir'
Usage examples:
## Move saved flows to a local dir
$> ticat hub.move-flows-to-dir <local-dir-path>
$> ticat hub.move <local-dir-path>
## Remove a saved flow
$> ticat flow.rm <command-saved-path>
## Remove all saved flows
$> ticat flow.clear