zoxide icon indicating copy to clipboard operation
zoxide copied to clipboard

Add PowerShell ArgumentCompleter

Open twobiers opened this issue 2 years ago • 0 comments

Resolves #344

I have tried to implement an equivalent Tab completion for PowerShell, which was to some point successful. It works like the following:

  • Use the default directory completion when no arguments are provided
  • If an argument is provided, use it as zoxide query input

Unfortunately it doesn't seem to be possible to run interactive queries in PowerShell within the argument completer, therefore I don't know whether it is possible to implement the "space+tab" completion. Also I am unsure what should happen if mutliple arguments are provided. At the moment the tab completion ignores that and happily completes the second argument. For example z dir1 dir2 would try to complete dir2 to z dir1 P:/tmp/dir2.

Maybe it would be useful to also add the default completions into the completions, so that I could use z as a cd replacement.

Please let me know your thoughts.

This GIF shows, how it works: WindowsTerminal_caWG2ym896

twobiers avatar Jul 08 '22 15:07 twobiers