Title: Unexpected Completion Behavior · Issue #148 · google/python-fire · GitHub
Open Graph Title: Unexpected Completion Behavior · Issue #148 · google/python-fire
X Title: Unexpected Completion Behavior · Issue #148 · google/python-fire
Description: Consider the following simple example (from the docs) #!/usr/bin/env python import fire def add(x, y): return x + y if __name__ == '__main__': fire.Fire(add, name='./add.py') The first command completion shows add and the second immediat...
Open Graph Description: Consider the following simple example (from the docs) #!/usr/bin/env python import fire def add(x, y): return x + y if __name__ == '__main__': fire.Fire(add, name='./add.py') The first command comp...
X Description: Consider the following simple example (from the docs) #!/usr/bin/env python import fire def add(x, y): return x + y if __name__ == '__main__': fire.Fire(add, name='./add.py') The fi...
Opengraph URL: https://github.com/google/python-fire/issues/148
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected Completion Behavior","articleBody":"Consider the following simple example (from the docs)\r\n\r\n```\r\n#!/usr/bin/env python\r\n\r\nimport fire\r\n\r\ndef add(x, y):\r\n return x + y\r\n\r\nif __name__ == '__main__':\r\n fire.Fire(add, name='./add.py')\r\n```\r\n\r\nThe first command completion shows `add` and the second immediately `--x --y`. \r\n\r\nThis is confusing, since I would expect to see `X` and after I entered the first number I would expect `Y` or or even `X Y` at the very beginning so I know I have to enter 2 numbers, especially since the Usage shows\r\n\r\n```\r\nUsage: ./add.py X Y\r\n ./add.py --x X --y Y\r\n```\r\n\r\nAs far as I can see it is also not possible to distinguish mandatory from optional arguments. In the case above `X` and `Y`are mandatory and I would not expect to see `--x`and `--y`. An optional argument could e.g. be `--modulo`, which would have a default value if not used, but how to distinguish that in the Python code from the other arguments?","author":{"url":"https://github.com/tschwaller","@type":"Person","name":"tschwaller"},"datePublished":"2018-10-27T17:20:51Z","url":"https://github.com/google/python-fire/issues/148"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e06dab7b-3ac8-6f67-7a16-29a64ae266ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D746:18E7F5:9EC48B:CE21F7:6AFFE7A2 |
| html-safe-nonce | eaf41c04e2ce3e0cc60a8f3e7a6bb02057b8a2f41f5d00e10466a78157a95056 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzQ2OjE4RTdGNTo5RUM0OEI6Q0UyMUY3OjZBRkZFN0EyIiwidmlzaXRvcl9pZCI6IjYyMDEzMDk3MzIwODMzMjg5MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2a7e7798b4df63f80033cb58f2cc417382588dd8b4762a316cc27f313f74ca15 |
| hovercard-subject-tag | issue:374667911 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-fire/148/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad0cb6221d2087e3bd8208d938ad78ffeff49413b066eb67e80e9b5eda5a08f7/google/python-fire/issues/148 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad0cb6221d2087e3bd8208d938ad78ffeff49413b066eb67e80e9b5eda5a08f7/google/python-fire/issues/148 |
| og:image:alt | Consider the following simple example (from the docs) #!/usr/bin/env python import fire def add(x, y): return x + y if __name__ == '__main__': fire.Fire(add, name='./add.py') The first command comp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tschwaller |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width