Skip to content

fix: align cwd flag names#409

Open
nijanthanvijayakumar wants to merge 3 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/cwd-flag-consistency
Open

fix: align cwd flag names#409
nijanthanvijayakumar wants to merge 3 commits into
CortexLM:mainfrom
nijanthanvijayakumar:fix/cwd-flag-consistency

Conversation

@nijanthanvijayakumar
Copy link
Copy Markdown

@nijanthanvijayakumar nijanthanvijayakumar commented May 21, 2026

Summary

  • use --cwd as the canonical working-directory flag
  • keep --cd as a compatibility alias
  • clean up two compile warnings hit while testing

Tests

  • cargo test -p cortex-cli cwd
  • cargo test -p cortex-tui external_editor

Docker smoke

Command:

docker run --rm -v "$PWD:/work" -v cortex-cargo-registry:/usr/local/cargo/registry -v cortex-target:/tmp/cortex-target -w /work -e CARGO_TARGET_DIR=/tmp/cortex-target rust:latest bash -lc 'apt-get update >/dev/null && apt-get install -y --no-install-recommends libasound2-dev >/dev/null; export PATH=/usr/local/cargo/bin:$PATH; printf "toolchain: "; rustc --version; printf "root: "; cargo run -p cortex-cli -- --help | grep -E -- "-C, --cwd|--cd"; printf "acp: "; cargo run -p cortex-cli -- acp --help | grep -E -- "-C, --cwd|--cd"; printf "shell: "; cargo run -p cortex-cli -- shell --help | grep -E -- "-C, --cwd|--cd"'

Output:

toolchain: rustc 1.95.0 (59807616e 2026-04-14)
root:   -C, --cwd <DIR>
acp:   -C, --cwd <DIR>
shell:   -C, --cwd <CWD>

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