fdir icon indicating copy to clipboard operation
fdir copied to clipboard

Cli version

Open borestad opened this issue 4 years ago • 6 comments

Hi. It's "apanzzon" from Reddit ;-)

A fdir-cli version would be interesting.

Due to corona chaos, I currently have very little spare time.

Would avoid using a framework, to avoid dependencies, or split it up to a secondary repo

borestad avatar Mar 16 '20 18:03 borestad

Hey, that's an amazing idea. Would be an awesome experiment. What features do you think it should have?

thecodrr avatar Mar 16 '20 18:03 thecodrr

I think it should be as simple as possible and only pass the exact same options as the library. Most importantly, being able to pipe from either stdin or stdout.

As for implementation - there's probably 2 options:

  1. Keep the bin within this repository. Create a very simple wrapper, with some custom parsing.

  2. Use some cli-helper like https://github.com/sindresorhus/meow - although the large amount of dependencies may be a turn off.

Then....you might have to decide if you want to support Windows and create a .bat-wrapper

Just some thoughts :)

borestad avatar Mar 16 '20 19:03 borestad

I think it should be as simple as possible and only pass the exact same options as the library.

I was thinking the same thing. There are about 5 options in the library. We can have a flag for each.

Most importantly, being able to pipe from either stdin or stdout.

The app would print a plain output to stdout and be able to take in input from stdin (of course).

Keep the bin within this repository. Create a very simple wrapper, with some custom parsing.

I think we shouldn't pollute the actual library. I will make a separate repo for the cli. I want to keep it zero dependency though so might have to do some basic parsing by hand. Shouldn't be too hard.

Once it's done, it can be published on npm and be used by anyone.

Then....you might have to decide if you want to support Windows and create a .bat-wrapper

That can be done, I think. First let's focus on getting the feature-set done.

thecodrr avatar Mar 16 '20 19:03 thecodrr

Looks like somebody beat you to it with your own library :smile: glob-searcher. "Great minds think alike" I guess.

JohnFitz avatar Jun 01 '20 05:06 JohnFitz

@JohnFitz 🤣🤣 yes that is true. But it's a little bit different.

I will be publishing the CLI version very soon. It's barebones but does everything you'd want it to; dumping the file paths to stdin.

thecodrr avatar Jun 01 '20 16:06 thecodrr

Superb! Can't wait to see it.

On Mon 1 Jun 2020, 17:53 Abdullah Atta, [email protected] wrote:

@JohnFitz https://github.com/JohnFitz 🤣🤣 yes that is true. But it's a little bit different.

I will be publishing the CLI version very soon. It's barebones but does everything you'd want it to; dumping the file paths to stdin.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thecodrr/fdir/issues/6#issuecomment-636983069, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQAKCO6DWMET7MQBYAC6I3RUPMH5ANCNFSM4LMRDX3A .

JohnFitz avatar Jun 01 '20 17:06 JohnFitz