broot icon indicating copy to clipboard operation
broot copied to clipboard

Changing drive letter on Windows

Open oshmoz opened this issue 1 year ago • 5 comments

Hello, I'm using broot as my daily Linux driver and I love it. I'm trying to use it on Windows and I can't seem to find a way to change the drive letter. Anyone has an idea? Thanks.

oshmoz avatar Jan 12 '24 14:01 oshmoz

Thanks for the labels. Maybe even "enhancement"?

oshmoz avatar Jan 12 '24 21:01 oshmoz

My workaround on this is this verb:

{
	invocation: goto {path}
	execution: "br {path}"
	leave_broot: true
	from_shell: true
}

I agree, not at all elegant, but saves a few seconds... I use explicitly to change drive letters on windows. It closes and reopens broot in the new location.

FelipeCybis avatar Feb 27 '24 17:02 FelipeCybis

@FelipeCybis useful, but my use case was to use broot to copy files from C: to Z: so I need 2 panels in 2 different drives.. I don't think quitting broot will keep the panels?

RobertoMaurizzi avatar Feb 28 '24 02:02 RobertoMaurizzi

@RobertoMaurizzi My workaround does not work for your use case, which would be the most useful one, I think.

At first I wanted to do a goto that would not leave broot, but my rust knowledge is still too limited.

FelipeCybis avatar Feb 28 '24 06:02 FelipeCybis

In recent versions of broot, :focus accepts a path, and you can use the builtin shorthand fo P: to switch to drive P. See https://dystroy.org/broot/conf_verbs/#focus

If it makes sense for your use case, it is also possible to browse to the drives by mounting them to a path somewhere under C. https://ss64.com/nt/mountvol.html (and I think there are other methods)

It is kind of counter intuitive that broot's cd can't be used in this way, but that might just be part of the learning curve.

Broot also now has a :filesystems command but that is apparent not available under Windows? https://dystroy.org/broot/conf_verbs/#internals

AeliusSaionji avatar Jul 07 '24 15:07 AeliusSaionji