autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

[cd] should work with `$CDPATH`

Open clo4 opened this issue 3 years ago • 1 comments

Sanity checks

  • [X] My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git completion 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)

clo4 avatar May 02 '22 02:05 clo4

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!

clo4 avatar Sep 28 '22 03:09 clo4