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

Assign ELNs to the output of commands #281

Open
LinArcX opened this issue Apr 2, 2024 · 3 comments
Open

Assign ELNs to the output of commands #281

LinArcX opened this issue Apr 2, 2024 · 3 comments

Comments

@LinArcX
Copy link

LinArcX commented Apr 2, 2024

Is your feature request related to a problem? Please describe.
I don't know if this featue exists or not. Imagin i'm using fd to search for all the *.mp3 files in my PWD and it's child directory like this:
fd -e mp3 -d2

The output can be like this:

foo.mp3
bar.mp3
Downloads/zoo.mp3
Downloads/kar.mp3
Downloads/dar.mp3
Downloads/nar.mp3

As you can see, there's no ELN assigned to each row in this output. so if i need to play the musics, i need to type my music player + name of the file, which is time consuming.

Describe the solution you'd like
I suggest we should have a mechanism to assign ELN to any stdout output.(generated by any command) in this way, we can benefit from all the things that we can do with ELN.

@leo-arch
Copy link
Owner

leo-arch commented Apr 2, 2024

As you can see, there's no EIN assigned to each row in this output.

You can search for files using clifm's internal search function (a slash followed by the query string), for example:

$ /*.mp3

If you want recursivity, you can use the -x parameter, as follows:

$ /*.mp3 -x

However, since ELN's are used only for currently listed file names (and thereby only for files in the current directory), only the first procedure provides ELN's, not the second one.

Of course, you can use external tools (like fd), but they do not know anything about ELN's.

I guess it wouldn't be that hard to write a plugin for this specific use case.

@LinArcX LinArcX changed the title Assign EINs to the output of commands Assign ELNs to the output of commands Apr 2, 2024
@LinArcX
Copy link
Author

LinArcX commented Apr 4, 2024

If you want recursivity, you can use the -x parameter, as follows..

Can I specify which directories I want to use with this parameter? I ask this because it will take a while if I want to do it in my ~. I prefer to do it just for example for: ~/Downloads, and ~/Musics

However, since ELNs are used only for currently listed file names (and thereby only for files in the current directory), ...

That's the point of my request. We can extend this functionality to not just focus on currently listed file names in the current directory, but instead on any listed files regardless of whether they are in the current directory or not.

@leo-arch
Copy link
Owner

leo-arch commented Apr 5, 2024

Hi @LinArcX.

Can I specify which directories I want to use with this parameter?

Yes, but only one, and there will be no ELNs either in the output.

We can extend this functionality to not just focus on currently listed file names in the current directory, but instead on any listed files regardless of whether they are in the current directory or not.

Maybe, but it wouldn't be a trivial implementation at code level. I think a plugin can do this quite easily. Take a look for example at the finder plugin. A few modifications here a there can do the job.

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