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

help に --dump オプションを追加します #16

Open
sonots opened this Issue Aug 31, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@sonots
Contributor

sonots commented Aug 31, 2017

@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

help をやたらと長くはしたくないそうなので、仕様議論中

Contributor

sonots commented Aug 31, 2017

help をやたらと長くはしたくないそうなので、仕様議論中

@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

ruby/ruby#1688

--dump=? を追加するのが難しい。現状、--dump=show_help で出せるようにはなった。

$ ./ruby -h
Usage: ./ruby [switches] [--] [programfile] [arguments]
  ...
  --dump=[target] try --dump=? to show valid targets
$ ./ruby --dump=show_help
$ ./ruby --dump=show_help
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump YARV instructions
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump parsetree or parsetree with comment
Contributor

sonots commented Aug 31, 2017

ruby/ruby#1688

--dump=? を追加するのが難しい。現状、--dump=show_help で出せるようにはなった。

$ ./ruby -h
Usage: ./ruby [switches] [--] [programfile] [arguments]
  ...
  --dump=[target] try --dump=? to show valid targets
$ ./ruby --dump=show_help
$ ./ruby --dump=show_help
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump YARV instructions
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump parsetree or parsetree with comment
@ko1

This comment has been minimized.

Show comment
Hide comment
@ko1

ko1 Aug 31, 2017

Owner

複数指定できることを言った方がいいかも?

Owner

ko1 commented Aug 31, 2017

複数指定できることを言った方がいいかも?

@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

--dump=insns,help とすると、help だけ出て終わったりするので、明言できないんすよねぇ。。

Contributor

sonots commented Aug 31, 2017

--dump=insns,help とすると、help だけ出て終わったりするので、明言できないんすよねぇ。。

@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

help は例外なので無視して、複数指定できる旨を記述します。

Contributor

sonots commented Aug 31, 2017

help は例外なので無視して、複数指定できる旨を記述します。

@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

こうなりました

# -h では出ない
$ ./ruby --help
Usage: ./ruby [switches] [--] [programfile] [arguments]
   ...
  --dump=target[,....]
                  try --dump=help to show help messages of --dump
$ ./ruby --dump=help
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump instruction sequences
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump AST or AST with comments.
Contributor

sonots commented Aug 31, 2017

こうなりました

# -h では出ない
$ ./ruby --help
Usage: ./ruby [switches] [--] [programfile] [arguments]
   ...
  --dump=target[,....]
                  try --dump=help to show help messages of --dump
$ ./ruby --dump=help
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump instruction sequences
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump AST or AST with comments.
@sonots

This comment has been minimized.

Show comment
Hide comment
@sonots

sonots Aug 31, 2017

Contributor

nobu says

What about --help=dump (--help=feature and so on)?

ってことで --help=dump に変わりました。

$ ./ruby --help
Usage: ./ruby [switches] [--] [programfile] [arguments]
   ...
  --dump=target[,....]
                  try --help=dump to show help messages of --dump
$ ./ruby --help=dump
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump instruction sequences
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump AST or AST with comments.
Contributor

sonots commented Aug 31, 2017

nobu says

What about --help=dump (--help=feature and so on)?

ってことで --help=dump に変わりました。

$ ./ruby --help
Usage: ./ruby [switches] [--] [programfile] [arguments]
   ...
  --dump=target[,....]
                  try --help=dump to show help messages of --dump
$ ./ruby --help=dump
Usage: ./ruby [switches] [--] [programfile] [arguments]
  --dump=insns    dump instruction sequences
  --dump=yydebug  dump yydebug of yacc parser generator
  --dump=parsetree, --dump=parsetree_with_comment
                  dump AST or AST with comments.
@ko1

This comment has been minimized.

Show comment
Hide comment
@ko1

ko1 Aug 31, 2017

Owner

スゴーイ。

Owner

ko1 commented Aug 31, 2017

スゴーイ。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment