Skip to content

feat: add psql-style \cd command - #115

Open
dcavalcante wants to merge 3 commits into
balajz:mainfrom
dcavalcante:feat/local-cd-command
Open

feat: add psql-style \cd command#115
dcavalcante wants to merge 3 commits into
balajz:mainfrom
dcavalcante:feat/local-cd-command

Conversation

@dcavalcante

@dcavalcante dcavalcante commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Add \cd to change pgxcli’s working directory, defaulting to the user’s home directory when no path is supplied.

Includes quoted and ~ paths, directory-only Tab completion and documentation

@balajz

balajz commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Please document the code, especially in areas where the logic might not be immediately clear, particularly where others might wonder, “Why is this done this way?” or “Why is this needed?”

@dcavalcante
dcavalcante force-pushed the feat/local-cd-command branch from 564df4b to f35588b Compare August 16, 2026 08:32
@dcavalcante

Copy link
Copy Markdown
Contributor Author

Please document the code, especially in areas where the logic might not be immediately clear, particularly where others might wonder, “Why is this done this way?” or “Why is this needed?”

done, lmk if anything is missing

@balajz

balajz commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution. I’d love to have tilde (~) completion, for example, when users type cd ~ and press Tab, it should complete to / (or \ on Windows).

@dcavalcante

dcavalcante commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Implemented in f1642f8: \cd ~ now completes to ~/ (or ~\ on Windows), while retaining tilde shorthand. Added a regression test as well.

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.

2 participants