laloch / xontrib-fzf-widgets

Set of fzf widgets for xonsh
GNU General Public License v3.0
33 stars 18 forks source link

On Windows file/folder search conflicts with free-cwd #12

Open eugenesvk opened 3 years ago

eugenesvk commented 3 years ago

There is a nifty xontrib free-cwd that allows not to lock a current folder:

Windows only xontrib, to release the lock on the current directory whenever the prompt is shown. Enabling this will allow the other programs or Windows Explorer to delete or rename the current or parent directories. Internally, it is accomplished by temporarily resetting CWD to the root drive folder while waiting at the prompt. This only works with the prompt_toolkit backend and can cause cause issues if any extensions are enabled that hook the prompt and relies on os.getcwd()

However, this breaks fzf file/folder search within the current folder as the current folder is reset to root, so the fzf search also starts from root :(

Is there any way to marry the two by somehow getting the current folder value before it's reset? If not, might be worth documenting this limitation