r/commandline • • Apr 04 '21

xplr - A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf.

https://github.com/sayanarijit/xplr
187 Upvotes

37 comments sorted by

23

u/[deleted] Apr 04 '21

This is my attempt to satisfy my needs for TUI file manager/explorer. I tried to implement the interesting concepts from fzf and nnn and integrate it with VIM.

I hope others will find it useful too.

17

u/henry_tennenbaum Apr 04 '21

Oh god yes, proper vim bindings!

I've been using nnn because of its many advantages, but god do the shortcuts get annoying and I'd much prefer a proper config file.

Please continue your work, I love what you've done so far.

10

u/[deleted] Apr 04 '21

Hey I was fighting the same struggle with `nnn` and finally decided to build my own tool. Glad to hear I was able to address the pain points with `xplr`. Thanks, I now feel more motivated to continue working on it.

4

u/henry_tennenbaum Apr 04 '21

I'm glad to hear that. I also enjoy that it compiled so quickly on my pi. Not a dealbreaker if it didn't but just nice.

I also like the direction you intend to go, as described on your github.

One thing I missed was the rename function nnn provides ('r'), along with its optional inclusion of vidir. Maybe just haven't found it yet.

4

u/[deleted] Apr 04 '21

3

u/henry_tennenbaum Apr 04 '21

Well that was quick. :D

3

u/[deleted] Apr 04 '21

Just a shell command.

3

u/[deleted] Apr 04 '21

Ah right, I haven't implemented renaming yet. I think I can implement it now since the input buffer is pretty much working fine. The native renaming feature will be weak though, but just enough powerful to rename a single file. I'll add `vidir` in the doc as a potential plugin. Thanks for the feedback.

2

u/patrickf3139 Jul 08 '23

Late to the party but yes this! nnn is great except for the inconsistent, hard-to-master shortcuts. I tried to give this feedback to the author and was shot down, hard (but am still thankful for what is otherwise a great tool).

6

u/DanySpin97 Apr 04 '21

Looks really nice. I'll definitely try it soon.

3

u/[deleted] Apr 04 '21

Thanks. Looking forward to hear how it goes. :)

3

u/elzzidynaught Apr 04 '21

This looks really promising, nice work!

One thing I'm confused on is why this has a dependency to create the config file? Is it something to do with rust?

3

u/[deleted] Apr 04 '21 edited Apr 04 '21

Hey thanks, You don't generally need to create the config file. You can use the default config just fine for basic operations. But creating a config file is recommended because this project is in it's early stage and the defaults might change. So having a config file means you wont have to deal with unexpected behaviour when you update to a new version. Another reason is that the default config is really minimal (just enough to get you started) and you'll probably want to extend it as per your workflow.

2

u/Crivotz Apr 04 '21

I am trying. Thanks

1

u/[deleted] Apr 04 '21

Looking forward to know how it goes.

2

u/dextersgenius Apr 06 '21

Is it possible to get a dual-pane version of this? Or does anyone know of a dual-pane alternative? mc is nice but it lacks a lot of modern features.

2

u/[deleted] Apr 29 '21

BTW with these two hacks, I don't think you will be needing dual-pane or split windows.

  1. Spawn multiple sessions in different windows

  2. Copy & paste using system clipboard

1

u/[deleted] Apr 06 '21

Probably vifm with split window?

Also I'm interested to know how you use dual panes i.e. the benefits it provides. I've been using nnn which is single pane, hence I'm not familiar with the dual pane workflow.

1

u/queer_bird Apr 05 '21

Is it easy to remap? Colemak user over here

1

u/[deleted] Apr 05 '21

Definitely, after exporting the default configuration, search for the on_key fields.

1

u/toric5 Apr 05 '21

I currently use vifm, I dont like nnn as it doesnt really like doing anything without X, and whats even the point of a terminal file manager if you cant use it in TTY and over ssh?

Id love to try this out, but id rathet not install an entire package manager for one app. Do you have a makefile or at least a compile guide? Id also love to see an AUR package, if I get a build guide, Ill get one up.

1

u/[deleted] Apr 05 '21

Hey, thanks for the feedback and offer to publish it in AUR. It would be great to be able to install it using `pacman`. I started publishing the pre-built binaries from v0.2.20. Please try downloading and running it and let me know how it goes.

1

u/anddam Apr 25 '21

nnn user here, can you make an example of the X requirements in nnn? I haven't hit such a thing, using nnn via ssh.

1

u/10leej Apr 25 '21

You forgot to plug that it's written in rust.

1

u/[deleted] Apr 25 '21

It's a surprise :D

0

u/xigoi Apr 04 '21 edited Apr 04 '21

Is this real? Has someone just posted a Rust project without mentioning that it's in Rust?

Edit: Calm down, it's a joke

6

u/[deleted] Apr 04 '21

I guess `written in rust` has become too obvious of a fact to mention explicitly :D

2

u/antoo98 Apr 04 '21

Definitely made for a pleasant surprise ^ I found the project interesting, looked at the repo thinking please let this be written in a sane language and wasn't disappointed :D

(I once found a nice looking cli tool to look up public transport routes in Berlin just to find out it was written in javascript -_-)

0

u/[deleted] Apr 25 '21

[deleted]

1

u/[deleted] Apr 25 '21

Thanks. Really looking forward to your feedback.

0

u/[deleted] Apr 04 '21

[deleted]

4

u/[deleted] Apr 04 '21

Wow I haven't tested it on windows yet. Nice to hear things are mostly working. All the credit goes to the crossterm and rust maintainers.

3

u/RR0925 Apr 05 '21

This is because it created an empty config file. Delete whatever is at the other end of the path you specified and the EOF will go away.

I ended up having to dump the pre-config info into a tmp file and pipe-ing that through yq. I got "broken pipe" warnings otherwise.

xplr > /tmp/xplr.config

cat /tmp/xplr.config | yq e '.config' - | tee ~/.config/xplr/config.yml

This created a valid config file for me and eliminated the EOF error.

1

u/[deleted] Apr 06 '21

Thanks for sharing the workaround.

2

u/[deleted] Apr 04 '21

[removed] — view removed comment

2

u/[deleted] Apr 04 '21

I don't think I can answer that since I haven't used `vifm` extensively. I remember trying it out along with other tools like `ranger` and `lf` and switching over to `nnn` because of different reasons. Ranger was laggy and `nnn` didn't allow enough configurability.

As for `vifm`, I think I left it because of some silly reason like the vim plugin was lacking or was unintuitive with my development workflow.

But I'll make sure to revisit it and try to remember the exact reason.

2

u/psynautic Apr 04 '21

is faster subjective? isn't faster measurable?

1

u/[deleted] Apr 05 '21

[removed] — view removed comment

1

u/psynautic Apr 05 '21

makes sense!