-
Notifications
You must be signed in to change notification settings - Fork 332
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
Support for using lf as a multi file & folder selection dialog #89
Comments
@cstrahan I'm confused about a few things. You mention you want to select multiple files with By the way, is there a reason you don't want to run your shell commands within |
Sorry, I should have given you a heads up about me updating the example
I'd like to be able to select multiple files/directories (e.g. with
Maybe the flag could be An additional option to use a null char (
I spend most of my time in If the feature sounds good, I could try implementing it. (Thanks for writing and sharing |
I should also add a couple more details, based on how I (now) have things set up with my
|
@cstrahan |
Oh, I see: from experimenting, I thought it only allowed for selecting files, but now I see that if you toggle some directories and files, and then Lines 251 to 289 in 3f7bd0a
So
What
It would be awesome if I could have
You're absolutely right! I didn't realize that |
@cstrahan I would say directories are meant to be opened by a file manager anyway so I don't see much point making it configurable especially if that will make things more complicated than it is right now. If we can simplify the current design somehow by making directory opening configurable, that would be fine, but I can't think of any way to do that. As you say, our best option is to add another builtin command to exit with the current selection or the current file. I was thinking maybe we could call it I'm getting warmer to this idea of using |
I was wondering if this is still on the table.
Writing to stdout if selection-path is not given would be perfect. That’s what nnn does as well for example (https://github.com/jarun/nnn/wiki/Usage#program-options). That way it’d be easier to integrate lf as a file picker for kakoune. To illustrate my usecase, it’s so I can use lf in commands like this:
|
@ismay This is an old issue and there are many things that have changed but I think you can already use
But it does not work well if you use stdout while running |
Ah I see. I’ll try implementing it that way, thanks for the explanation! edit: for those looking to do the same, this is what I've settled on in terms of integrating lf with kakoune, works like a charm:
|
It would be awesome if lf could be used for selecting multiple files (and directories)!
As an example, ranger has a
--choosefiles
option that writes out the selected files and/or folders. With this option, I can write a key binding for zsh so thatctrl+o
will allow me select multiple files and directories, hit enter to exit, and then all the paths are inserted directly into the command line at the location of the cursor. FWIW, here's what my zsh binding (and zle widget) look like:Code ugliness aside, hopefully that gives a sense of what I'm going for.
The text was updated successfully, but these errors were encountered: