Repository navigation
Replies: 1 comment
|
done in #981, will be in the next release.
one thing stays as documented: running a command from the palette or with |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A custom command fired from the scratch pane gets the main pane's directory in
$AGT_SESSION_PWD, not the scratch shell's. The reference documents this ("the scratch terminal reports the main pane's, since it tracks no cwd of its own"), so it's not a bug, but it breaks the obvious use of the scratch pane.Repro:
Session with an agent in the main pane, cwd
~/src/projectOpen the scratch terminal,
cd docs/plans,lsSelect a file name from the
lsoutput and fire a custom command that resolves the selection against$AGT_SESSION_PWD, e.g.HUD says "no such file", because the command ran in
~/src/project, not~/src/project/docs/plansagtermctl tree --jsonshows the same thing: the scratch surface has apaneIDbut nocwd.The scratch pane is where I browse files next to the agent, so selection-based commands are most useful from there. #482 fixed this for the split pane. Tracking OSC 7 for the scratch shell the same way would make
$AGT_SESSION_PWD(and thecwdin the tree) correct when$AGT_PANEisscratch.Workaround today is finding the shell by
AGTERM_PANE_ID=$AGT_PANE_IDinps -Eand reading its cwd withlsof, which is too hacky for a one-line keymap command.All reactions