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

What should the default command be? #20

Open
akkartik opened this issue Oct 11, 2017 · 4 comments
Open

What should the default command be? #20

akkartik opened this issue Oct 11, 2017 · 4 comments
Labels

Comments

@akkartik
Copy link
Contributor

Right now it's cat ~/.config/rat/ratrc.

However, the location of ratrc is no longer hard-coded. At the very least we should make the command consistent with that.

But perhaps there's a better default? Perhaps it's better to have no default, just a usage message?

@TeddyDD
Copy link
Contributor

TeddyDD commented Oct 11, 2017

Maybe user could specify default command per mode?
Edit: I imagine it could work like this:
Every mode might have defined default command. Rat could use first param as mode switch by default.
So instead writing rat --mode files --cmd "ls -al" you could write rat ls, rat git and so on. You could override default command with --cmd flag rat files --comand "ls -thor"

@ericfreese
Copy link
Owner

ericfreese commented Oct 13, 2017

instead writing rat --mode files --cmd "ls -al" you could write rat ls, rat git and so on.

I actually see this verbosity problem being solved by aliases and other wrapper scripts. I have a couple I use personally: search and git-rat.

I think cmd could just be a required arg for now.

@TeddyDD
Copy link
Contributor

TeddyDD commented Oct 18, 2017

It's not about verbosity but about easy configuration sharing. Currently you have git example - and I don't know how to use it since I don't know default command. I have no problem with wrapper scripts but I think default command per mode will be common pattern.

@ericfreese
Copy link
Owner

Currently you have git example - and I don't know how to use it since I don't know default command

The idea with git-rat is that there is no default command. You can call it with any git command and it will run that command with mode git.misc which tries to annotate all kinds of git things.

I think default command per mode will be common pattern.

I'm not personally convinced of this but if you make a PR for it I'll likely merge as Rat is still at a prototype/experimental stage where I think we should try out things to see if they stick.

ericfreese added a commit that referenced this issue Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants