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

Correct wording in CLI usage messages #3579

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

ProgerXP
Copy link
Contributor

Related but unsure if worth separate issues:

  • Please add separators between different subcommands. It's really hard to see from the quick glance which options apply to, say, decode, especially since they all have different alignment (if aligned to 24 columns, d to 32, b to 25, etc.):
usage: apktool [-q|--quiet OR -v|--verbose] if|install-framework [options] <framework.apk>
 -p,--frame-path <dir>   Store framework files into <dir>.
 -t,--tag <tag>          Tag frameworks using <tag>.
*** Why not put a blank line here? ***
usage: apktool [-q|--quiet OR -v|--verbose] d[ecode] [options] <file_apk>
 -api,--api-level <API>         The numeric api-level of the file to generate, e.g. 14 for ICS.
 -b,--no-debug-info             Do not write out debug info (.local, .param, .line, etc.)
... lots of text ...
 -s,--no-src                    Do not decode sources.
 -t,--frame-tag <tag>           Use framework files tagged by <tag>.
*** Why not put a blank line here? ***
usage: apktool [-q|--quiet OR -v|--verbose] b[uild] [options] <app_path>
 -a,--aapt <loc>          Load aapt from specified location.
  • -c,--copy-original says "See project page for more info" but I was unable to locate anything related to this option on apktool.org. I understand it might be self-explanatory, then why this reference to more info?
  • -nc,--no-crunch says "Disable crunching of resource files" but this doesn't explain anything. A pointer on what this does would be much appreciated.

P.S: thank you for maintaining this project and making it strive for over a decade!

@iBotPeaches iBotPeaches merged commit 6436e7c into iBotPeaches:master Apr 26, 2024
25 checks passed
@iBotPeaches
Copy link
Owner

thanks!

@iBotPeaches iBotPeaches added this to the v2.10.0 milestone Apr 26, 2024
@iBotPeaches
Copy link
Owner

Please add separators between different subcommands. It's really hard to see from the quick glance

I guess thats personal preference - I much prefer it the way it is now. That change creates the usage output to be quite larger vertically and Apktool has an advantage from being compact usage output.

-c,--copy-original says "See project page for more info" but I was unable to locate anything related to this option on apktool.org.

I see it under build params and looks documented to me - https://apktool.org/docs/cli-parameters#building-options

-nc,--no-crunch says "Disable crunching of resource files" but this doesn't explain anything.

I've added a note here to further explain no-crunch - f96153c

@ProgerXP
Copy link
Contributor Author

I guess thats personal preference - I much prefer it the way it is now. That change creates the usage output to be quite larger vertically and Apktool has an advantage from being compact usage output.

It's just 7 extra lines. Well, at least there's an indentation before every option but perhaps at least wrap lines at 80th column? Currently it wraps at 120 (which I understand is standard for your code) which renders the indentation useless if not confusing because in general terminal windows default to a smaller width. Here's how I see it, with 3 wrapped lines shadowing "usage:" and an "almost blank" line with 'keep' that gives false promise as a separator.

apktool

Compare this with unzip:

unzip

I see it under build params and looks documented to me - https://apktool.org/docs/cli-parameters#building-options

But it says exactly the same as on the command line. While on the command line it also adds "See project page for more info". There's no "more info", that's my point.

I've added a note here to further explain no-crunch - f96153c

That's perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants