Closed lord63 closed 8 years ago
Maybe add an --edit
option that use $EDITOR
variable to open the file in the preferred editor of the user ?
@Shir0kamii If you want to edit your page, you can try this way:
$ tldr locate tar | xargs gedit
In my case, the $EDITOR
variable is None, seems like you need to set it.
But you're right, edit the pages should be easy to go.
Currently, I'm for the first implementation, it's simple, easy for test and reliable, you also have more choices for the editors. I haven't made the decision yet, so it's open for discussion :)
Indeed, I was wrong with this since it's only available on some Linux architectures (Not even all Linux).
But one could set an editor
variable in his tldrrc to use the command, isn't it ?
Yes, we can add another variable to the configuration file and let tldr.py
to read it. We'll need to:
Also, users who use the old version of tldr.py
need to edit the configuration file. And this may make the initialization a bit complex: too much configuration to set up.
Still prefer the first one.
Just send a PR to support locate the man page with a few lines of code. If it looks good, a new release will come soon.
I'll try to do it this night (french hours)
If I commited nothing tomorrow, feel free to make a release, and I'll add this functionnality later.
@Shir0kamii Thank you for the help :)
v0.5.0 support locate the man page via tldr locate {{command}}
, close it now.
If we want to custom our man pages, we need to find it in the command folder or in the platform folder, a little inconvenient. Maybe we should add a subcommand like this:
so we can easily edit the man pages.
Any ideas?