-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Remove line wraps for the help usage #298
Comments
@mbkupfer
How does that get formatted in the 'default' terminal window? |
Look's great. Why don't you just add this to the usage text instead of |
The formatting of the |
Oh ok. Got it.
…On 12/19/18 11:32 AM, abraunegg wrote:
Look's great. Why don't you just add this to the usage text
instead of |--help|?
The formatting of the |--help| is based on the D language functions
used to handle input options & output. Will investigate to see if this
can be 'fixed', however in a SSH session via putty or other, it does
not line wrap, so this issue is more of a 'default terminal options'
item for your Linux install which is causing the lines to line wrap.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGBUMKgmHeBZ7qtivfvGVI8AUUbg12AIks5u6pQ0gaJpZM4Zaz_N>.
|
What about the following output?
|
@norbusan , this looks much better. Here are some suggestions:
I don't write many cli's so I don't know the main convention, but I hope you understand my example. |
Hi @mbkupfer Yeah, it was only a first shot without much work necessary. Adding the information about arguments and their types is a bit a pain due to the D getopt interface, but I'm looking into it. Concerning the initial description, any suggestion ;-) ? |
Wish I could help there, but I didn't even know about the D language until I got to this project.
I'm still learning how onedrive works myself. I don't think I would be a definitive source |
@norbusan Might I recommend using http://docopt.org/ for this purpose. It does exacly what you need but in reverse. First you specify formatted docopt usage message, and then logic does parameter validation and conversion. Aaaaand it implemented in almost every language now |
@adudek thanks, I'll look into that, but for now i don't want to go into using dup, so I think we would need to copy the source code. |
I have implemented the command line parsing via docopt.d The current status is as follows (see branch https://github.com/abraunegg/onedrive/tree/norbert/betterHelpFormat): No argument given, or wrong argument given, or error:
Help given:
Let me know what you think? |
LGTM
needs a slight tweak:
|
First off, great work! I think this looks much better. Below are some comments I have. Please don't take this as me being critical, I'm simply giving the honest opinion of someone that is new to this tool and want's to figure out how it works. I think it is really easy to shoot yourself in the foot by getting into a state where you delete files from the cloud without any backup. Comments:
|
Thanks, fixed |
what do you mean? None of them are? Please look at it on github, not in the email. This is markdown for the purpose of formatting.
It is replaced with the correct value for the user invoking the program.
For now I just used the help strings as they have been till now.
I leave wording improvements to @abraunegg - I'm not native and might scramble down stupid things ;-) |
What I mean is that arguments have to be surrounded by single-quotes. For example, if I want to do a
|
Generally it is better to put single quotes around items as per |
Ohhh, I see now. Got it.
…On Thu, Dec 20, 2018, 4:45 PM abraunegg ***@***.*** wrote:
What I mean is that arguments have to be surrounded by single-quotes. For
example, if I want to do a --single-directory with folder foo, then I
have to enter it as such:
onedrive --synchronize --single-directory 'foo' @abraunegg
<https://github.com/abraunegg> , am I correct in understanding this?
Generally it is better to put single quotes around items as per onedrive
--synchronize --single-directory 'foo' so that 'spaces in the item' get
read in correctly without issue by the application.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGBUMMRYgUucWSGIErzGQBAWNcQezBUqks5u7C8hgaJpZM4Zaz_N>
.
|
Ahh, this one. That is basic property of parsing by the used shell, and nothing related to onedrive. |
@norbusan @abraunegg , is this issue closed? |
@mbkupfer No, this is a pull request but it is not decided whether - and if when - we integrate it. We first have to fix some bugs and clean up some stuff before moving forward with this. Very similar to the build system reworks, this is also on lower priority. Thanks for your understanding |
@norbusan |
After merging the display-sync-status stuff I'll rework the patch and hello text to for current status. |
Instead of using the auto-generated help message from getopt, use docopt style help message and use the docopt command line parser.
Fixed with recent merge |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is your feature request related to a problem? Please describe.
Help text is very hard to read since the long lines are wrapping the terminal. I always need to expand my terminal to get rid of the linewrap.
Describe the solution you'd like
A column like help text. Instead of the lines wrapping to the beginning of the terminal, we can instead have them break in their own column.
Additional context
The text was updated successfully, but these errors were encountered: