Skip to content

fix(completion): handle -C and vpr directory completion - #3410

Closed
nekomoyi wants to merge 3 commits into
voidzero-dev:mainfrom
nekomoyi:fix/completion-chdir-rust
Closed

nekomoyi wants to merge 3 commits into
voidzero-dev:mainfrom
nekomoyi:fix/completion-chdir-rust

Conversation

@nekomoyi

Copy link
Copy Markdown
Collaborator

Fix shell completion for -C and vpr:

  • Handle -- in completion arguments so -C <dir>, -C<dir>, and -C=<dir> correctly switch the target working directory for task suggestions instead of falling back to the current directory.
  • Fix Bash translating vpr -C forms to invalid syntax vp run -C ... instead of vp -C ... run, preserving task completion across separate, attached, and equals styles.
  • Fix Bash wordbreak handling by reassembling words split on = (e.g. -C=<dir>), and add directory ValueHint to -C.

@nekomoyi

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T06:44:42.910245Z 236616b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 158dc7c8b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch 2 times, most recently from 36f8cda to 7b135bd Compare November 10, 2026 11:07
@nekomoyi

Copy link
Copy Markdown
Collaborator Author

@codex review

@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch from 7b135bd to dd40161 Compare November 10, 2026 11:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b135bd2eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_global_cli/src/main.rs Resolved
@nekomoyi nekomoyi closed this Nov 10, 2026
@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch from dd40161 to 43a3ef3 Compare November 10, 2026 14:10
- Peek leading -C <dir> in CompleteEnv and switch process cwd before running completion, so cwd-sensitive task completers (vp run / vpr) resolve tasks from the target directory.
- Expand leading ~ and ~/ (and Windows ~\ ) in resolve_chdir during both completion and normal execution.
- Decode POSIX quotes and backslash escapes in bash and zsh via shlex.
- Support -C=<dir> reassembly in bash completion and insert run for vpr in-place, avoiding bash 3.2 array slicing bugs.
- Add ValueHint::DirPath to -C flag.
@nekomoyi nekomoyi reopened this Nov 11, 2026
@nekomoyi

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 817c3a333c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_global_cli/src/main.rs Resolved
… in tests

- Keep apply_chdir strictly literal during normal runtime execution, matching path.resolve and POSIX cd semantics.
- Resolve tilde paths via resolve_completion_chdir exclusively in completion mode.
- Use vpt mkdir and vpt rm in assert_completion.bash per AGENTS.md portability guidelines.
@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch from 6fcdc6a to 10d31b5 Compare November 11, 2026 05:24
@nekomoyi

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10d31b507a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_global_cli/src/main.rs Resolved
@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch from 10d31b5 to bbffecd Compare November 11, 2026 06:14
@nekomoyi
nekomoyi force-pushed the fix/completion-chdir-rust branch from bbffecd to 236616b Compare November 11, 2026 06:29
@nekomoyi

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 236616bbe1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_global_cli/src/main.rs Resolved
@nekomoyi

Copy link
Copy Markdown
Collaborator Author

Closing. Shell-specific tilde escaping in completion arguments requires a broader redesign.

@nekomoyi nekomoyi closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant