Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory chooser #530

Open
devraza opened this issue Apr 16, 2024 · 2 comments
Open

Directory chooser #530

devraza opened this issue Apr 16, 2024 · 2 comments

Comments

@devraza
Copy link

devraza commented Apr 16, 2024

Though joshuto has a file chooser (--file-chooser) this doesn't seem to work on directories. Ranger, however, apparently does support this (--choosedir). There should be an option to choose files or directories, which can be useful when selecting what directory a file should download to in qutebrowser, for example.

@DLFW
Copy link
Contributor

DLFW commented May 11, 2024

Hi,
I have no idea how --file-chooser works; Joshuto lacks documentation on that.

But what works for me is to use a temp-file for the output (joshuto --output-file /tmp/josh-selection) and then quit Joshuto with quit --output-current-directory (which I have mapped to Q). Downside: It returns the directory you're in, not the one that is selected. I agree it's not great but it does the job for me.

Also agree that a straight-forward --dir-chooser would be a good enhancement. (And some docs for --file-choose.)

@devraza
Copy link
Author

devraza commented Jun 5, 2024

@DLFW as it turns out, that is actually how Ranger works with its --choosedir. And I'm not sure if there's a need to add an argument to provide this functionality if it can be done without a separate argument. Though I do think there's a lack of documentation around --file-chooser as I couldn't figure out how it worked today - it looks like it needs to be paired with --output-file though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants