autocomplete
autocomplete copied to clipboard
[cd] should work with `$CDPATH`
Sanity checks
- [X] My issue relates to a specific CLI completion spec (e.g.
git checkoutis missing options ingitcompletion spec). If your issue is more general, please create your issue here: withfig/fig - [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
- [x] I would like to work on this.
What CLI tool does this relate to?
cd
Which statement makes the most sense?
Something else
Issue Details
ZSH uses a variable, $CDPATH, to control the search order for cd. If empty, it will be .. You can add directories to this variable as a colon-separated list.
This is blocked on: https://github.com/withfig/fig/issues/741 (or https://github.com/withfig/fig/issues/620)
This is now possible but the change actually has to be implemented in the autocomplete engine itself
filepaths/folders will cd to the cwd+arg and run ls, so we instead need to change this to cd to cwd, then cd to arg directory, then run ls. This will also allow using variables in the path too!