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

Usage replace $*PROG-NAME with literal “command” #926

Merged
merged 1 commit into from Nov 23, 2016
Merged

Usage replace $*PROG-NAME with literal “command” #926

merged 1 commit into from Nov 23, 2016

Conversation

kalkin
Copy link
Contributor

@kalkin kalkin commented Nov 22, 2016

No description provided.

@vendethiel
Copy link
Contributor

Can I ask what's the reason for this one?

@zoffixznet
Copy link
Contributor

zoffixznet commented Nov 23, 2016

Can I ask what's the reason for this one?

There's been a somewhat lengthy discussion on this today: https://irclog.perlgeek.de/perl6/2016-11-22#i_13613926

It boils down to basically the current version generating unreadable usage messages. Below's one generated for zef, for example. Which looks unreadable when you run it in the terminal and the lines wrap:

zoffix@VirtualBox:~$ zef --blah
Usage:
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--force] fetch [<identities> ...] -- Download specific distributions
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--force] test [<paths> ...] -- Run tests
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--force] build [<paths> ...] -- Run Build.pm
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--depends] [--test-depends] [--build-depends] [--test] [--fetch] [--force] [--dry] [--update] [--upgrade] [--depsonly] [--serial] [--exclude=<Any>] [--to|--install-to=<Any>] install [<wants> ...] -- Install
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--force] [--from|--uninstall-from=<Any>] uninstall [<identities> ...] -- Uninstall
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--wrap=<Int>] search [<terms> ...] -- Get a list of possible distribution candidates for the given terms
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--max=<Int>] [-i|--installed] list [<at> ...] -- A list of available modules from enabled content storages
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E upgrade [<at> ...] -- Upgrade installed distributions (BETA)
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E rdepends <identity> -- View reverse dependencies of a distribution
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--sha1] locate <identity> -- Lookup locally installed distributions by short-name, name-path, or sha1 id
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--wrap=<Int>] info <identity> -- Detailed distribution information
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--force] look <identity> -- Download a single module and change into its directory
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--depends] [--test-depends] [--build-depends] [--test] [--fetch] [--force] [--update] [--upgrade] [--depsonly] [--exclude=<Any>] [--to|--install-to=<Any>] smoke -- Smoke test
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E update [<names> ...] -- Update package indexes
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [--confirm] nuke [<names> ...] -- Nuke module installations (site, home) and storages from config (RootDir, StoreDir, TempDir)
  /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E [-h|--help] 
zoffix@VirtualBox:~$ 

Replacing the giant pathname with word command is the least of the evils IMO, since the user knows what command they ran to generate the usage message anyway.

@zoffixznet
Copy link
Contributor

Based on earlier conversation and ascent in #perl6-dev, seems there's a general 👍 on this PR, so I'm merging :)

@zoffixznet zoffixznet merged commit 6ee524c into rakudo:nom Nov 23, 2016
@zoffixznet
Copy link
Contributor

Thanks a lot!

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

3 participants