o: accept sname/aname syntax for new command
This commit is contained in:
parent
05770ee28b
commit
6465861908
|
|
@ -251,8 +251,11 @@ cmd_log() {
|
|||
|
||||
cmd_new() {
|
||||
if [[ -n "$CTX_AGENT" ]]; then
|
||||
echo "error: cannot create nested agents" >&2
|
||||
exit 1
|
||||
# o session/agent new [cwd] — create the agent in that session
|
||||
local agent_cwd="${1:-$PWD}"
|
||||
printf 'name=%s\ncwd=%s\n' "$CTX_AGENT" "$agent_cwd" | ollie-9p write "session/$CTX_SESSION/agent/new"
|
||||
echo "created agent: $CTX_SESSION/$CTX_AGENT"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -n "$CTX_SESSION" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue