thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
65 stars 49 forks source link

proposal on `pinto config` command #125

Open melezhik opened 11 years ago

melezhik commented 11 years ago

It'd be useful to have a command to print repository configuration:

  pinto -r /path/to/my/repository config

would give information from .pinto/config/pinto.ini for this repository:

 target_perl_version = ...
 sources = ...
 # etc ...

Additional to have shortcut for configuration editing:

# repo path taken from environment
pinto config edit

# or explicitly  
pinto -r /path/to/my/repository config edit
thaljef commented 11 years ago

Is this just for convenience, so you don't need to remember the path to pinto.ini?

Or is there some other usefulness that you're thinking of?

melezhik commented 11 years ago

Mostly for convenience. It's hard to remember path to pinto configuration file. Also when repository is set implicitly by environment it's very easy too!

My main idea is when I work with pinto I mostly type commands of pinto client, pinto add, pinto pull, etc, and of course with some flags, and -r is among them. Then you can use history of your terminal to avoid retyping commands, you know what I mean (: and as for me I often want to see configuration settings for different repos and I also often switch between different repos, and to edit their configuration settings, and I think it's logical to wrap it around pinto client command interface.

This is what I mean.

As in classical cpan client you have one, unite interface both to edit settings and to make installations.

melezhik commented 10 years ago

Hi Jeff! Not sure If I yet need it ... so you may close the issue if no one else need this feature

thaljef commented 10 years ago

I think it's a good idea, so I'm going to leave it open.

melezhik commented 10 years ago

ok, Jeff.

2014-02-07 Jeffrey Ryan Thalhammer notifications@github.com:

I think it's a good idea, so I'm going to leave it open.

— Reply to this email directly or view it on GitHubhttps://github.com/thaljef/Pinto/issues/125#issuecomment-34465981 .

thaljef commented 10 years ago

I think the interface would probably look like this:

# Show config file
pinto [-r /path/to/repo] config

# Open config file using PINTO_EDITOR or EDITOR or VISUAL
pinto [-r /path/to/repo] config --edit
melezhik commented 10 years ago

Goo

2014-02-23 0:33 GMT+04:00 Jeffrey Ryan Thalhammer notifications@github.com :

I think the interface would probably look like this:

Show config file

pinto [-r /path/to/repo] config

Open config file using PINTO_EDITOR or EDITOR or VISUAL

pinto [-r /path/to/repo] config --edit

— Reply to this email directly or view it on GitHubhttps://github.com/thaljef/Pinto/issues/125#issuecomment-35813789 .

melezhik commented 10 years ago

Sorry, last line meant - good. (:

2014-02-23 9:21 GMT+04:00 Alexey Melezhik melezhik@gmail.com:

Goo

2014-02-23 0:33 GMT+04:00 Jeffrey Ryan Thalhammer < notifications@github.com>:

I think the interface would probably look like this:

Show config file

pinto [-r /path/to/repo] config

Open config file using PINTO_EDITOR or EDITOR or VISUAL

pinto [-r /path/to/repo] config --edit

— Reply to this email directly or view it on GitHubhttps://github.com/thaljef/Pinto/issues/125#issuecomment-35813789 .

benrifkah commented 10 years ago

Just as a clarification this is being proposed for repository wide configuration and is not the same as the stack specific "pinto props" command right?

thaljef commented 10 years ago

this is being proposed for repository wide configuration and is not the same as the stack specific "pinto props" command right?

Yes, that is my understanding. It's just a convenience for getting at the config file inside the repository.

However, I have considered moving all configuration inside the database, which would make this command obsolete (or at least change how it works). So I supposed I need to decide that first.

thaljef commented 10 years ago

Just to clarify:

The stack "props" live inside the database.

But the global repository configuration is in the config file.