Repository navigation
Conversation
From within a shell, agent-shell-cwd answers with that shell's own directory, so a shell started from one through C-x p p started in the current shell's directory rather than in the chosen project, and listed that directory's sessions to resume. A new shell now ignores the shell it was started from while project-switch-project is running the command for a project. Asked about an existing shell, agent-shell-cwd still answers with that shell's directory, which is how shells are matched to projects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I start a new shell with
C-x p p, pick a project, and runagent-shell-new-shellwhile I'm in another agent-shell buffer, the new shell starts in the current shell's directory instead of the project I picked. It also lists that directory's sessions to resume.This happens because
agent-shell-cwdgives a shell's own directory when called inside a shell, so it never looks atproject-current-directory-override.The change is limited to
agent-shell--start. Whenproject-current-directory-overrideis set, the new shell's directory comes from the new-shell half ofagent-shell-cwd, which I split out asagent-shell--new-shell-cwd. Otherwise nothing changes, and a new shell started from a shell still starts in that shell's directory.Checklist
M-x checkdocandM-x byte-compile-file.