René's URL Explorer Experiment


Title: Completion Enhancements by meshde · Pull Request #144 · google/python-fire · GitHub

Open Graph Title: Completion Enhancements by meshde · Pull Request #144 · google/python-fire

X Title: Completion Enhancements by meshde · Pull Request #144 · google/python-fire

Description: Introduction This PR changes the completion scripts that are generated by running the --completion option for the Fire generated commands. The changes are aimed to give more flexibility to the user. Main Changes The highlight of this PR is the shift from using start based completion to last-command based completion. In the start based completion, the entire string that has been entered into the command prompt so far is used to map the completion suggestions. This creates inflexibility for the user, causing #136. In the last-command based completion, suggestions are based on the last command/subcommand (non-option arg) entered by the user. This gives flexibility to the user, to be able to use options in any order, thereby fixing #136. Features The features added are: Ability to use options in any order. Options that are already entered are not shown in the suggestion list. The completion script abides by the usage of Fire generated CLI commands, such that function arguments are removed from the suggestion list once a module level option (or global option) is entered. In other words, module options come either before a function or after it's arguments (see guide) All the above included for both: bash & fish

Open Graph Description: Introduction This PR changes the completion scripts that are generated by running the --completion option for the Fire generated commands. The changes are aimed to give more flexibility to the user...

X Description: Introduction This PR changes the completion scripts that are generated by running the --completion option for the Fire generated commands. The changes are aimed to give more flexibility to the user...

Opengraph URL: https://github.com/google/python-fire/pull/144

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b2e23309-017d-ef76-2ca7-cac4c06610b6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA84:2E6021:24CFF19:300C779:6AFFF64F
html-safe-nonce85734932b5a14bf41d0193c58352a7a459b706a0a05e60e92577adc21a6ebe8a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTg0OjJFNjAyMToyNENGRjE5OjMwMEM3Nzk6NkFGRkY2NEYiLCJ2aXNpdG9yX2lkIjoiNTk0MTU2NjgxMzE0OTA2NjgzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb50062eb9ee58fd2546f72b654c9d3d3a79fe6e92247bcdeeab331c8b701e431
hovercard-subject-tagpull_request:222676192
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/google/python-fire/pull/144/files
twitter:imagehttps://avatars.githubusercontent.com/u/25736918?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/25736918?s=400&v=4
og:image:altIntroduction This PR changes the completion scripts that are generated by running the --completion option for the Fire generated commands. The changes are aimed to give more flexibility to the user...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/google/python-fire git https://github.com/google/python-fire.git
octolytics-dimension-user_id1342004
octolytics-dimension-user_logingoogle
octolytics-dimension-repository_id82729529
octolytics-dimension-repository_nwogoogle/python-fire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id82729529
octolytics-dimension-repository_network_root_nwogoogle/python-fire
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/google/python-fire/pull/144/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fpython-fire%2Fpull%2F144%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fpython-fire%2Fpull%2F144%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=google%2Fpython-fire
Reloadhttps://github.com/google/python-fire/pull/144/files
Reloadhttps://github.com/google/python-fire/pull/144/files
Reloadhttps://github.com/google/python-fire/pull/144/files
googlehttps://github.com/google
python-firehttps://github.com/google/python-fire
Codehttps://github.com/google/python-fire
Issues146 (146)https://github.com/google/python-fire/issues
Pull requests85 (85)https://github.com/google/python-fire/pulls
Actionshttps://github.com/google/python-fire/actions
Projectshttps://github.com/google/python-fire/projects
Security and qualityhttps://github.com/google/python-fire/security
Insightshttps://github.com/google/python-fire/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgoogle%2Fpython-fire%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgoogle%2Fpython-fire%2Fissues%2Fnew%2Fchoose
dbieberhttps://github.com/dbieber
google:masterhttps://github.com/google/python-fire/tree/master
meshde:masterhttps://github.com/meshde/python-fire/tree/master
Conversation 9 https://github.com/google/python-fire/pull/144
Commits 10 https://github.com/google/python-fire/pull/144/commits
Checks 0 https://github.com/google/python-fire/pull/144/checks
Files changed https://github.com/google/python-fire/pull/144/files
Please reload this pagehttps://github.com/google/python-fire/pull/144/files
Completion Enhancements https://github.com/google/python-fire/pull/144/files#top
Show all changes 10 commits https://github.com/google/python-fire/pull/144/files
361760e Make option flags available in completion even if prev word is anothe… meshde Oct 10, 2018 https://github.com/google/python-fire/pull/144/commits/361760e97a76f895d7e9131f0d9063f5bdc6c6ca
2465cf7 Refactor: Move preprocessing steps in _BashScript into separate func meshde Oct 11, 2018 https://github.com/google/python-fire/pull/144/commits/2465cf7a32003833ba9ae4b87308f2a60d6d8f54
0738229 Fix #136 for Fish meshde Oct 11, 2018 https://github.com/google/python-fire/pull/144/commits/0738229b09929e12d608aa61f17fb7913729a1cd
43942da Remove entered options from completion suggestions meshde Oct 12, 2018 https://github.com/google/python-fire/pull/144/commits/43942da3b6e3a24be8e1ce74dccda29df29400e6
2381503 Ensure module flags appear before a func or after its args meshde Oct 13, 2018 https://github.com/google/python-fire/pull/144/commits/2381503f631b715cfdc72e0836ea05c741d34d51
f558ebc Update TabCompletionTest meshde Oct 14, 2018 https://github.com/google/python-fire/pull/144/commits/f558ebc95f1256784dda679f2529298cc51e2a16
708b2cc Minor Correction in completion_test meshde Oct 15, 2018 https://github.com/google/python-fire/pull/144/commits/708b2cc3adb3231c87fc606f50a03dea007387b4
c01b011 Fix iterating through a command more than once while generating its c… meshde Nov 4, 2018 https://github.com/google/python-fire/pull/144/commits/c01b01182b9f41e6bd8980f9915b1ad298da2383
1fd2424 pylint fixes meshde Nov 4, 2018 https://github.com/google/python-fire/pull/144/commits/1fd24246f2dcfe09548c54453adc3acd447bf226
da780bc Minor fix meshde Nov 4, 2018 https://github.com/google/python-fire/pull/144/commits/da780bc676017f259989a0a4e0754b4521b6d6e1
Clear filters https://github.com/google/python-fire/pull/144/files
Please reload this pagehttps://github.com/google/python-fire/pull/144/files
Please reload this pagehttps://github.com/google/python-fire/pull/144/files
completion.py https://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
completion_test.py https://github.com/google/python-fire/pull/144/files#diff-65a2d8f939b7cb6969175a3c2d684afb3e74691b2a92c6ce968e84d2be324704
fire/completion.pyhttps://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
View file https://github.com/meshde/python-fire/blob/da780bc676017f259989a0a4e0754b4521b6d6e1/fire/completion.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/google/python-fire/pull/144/{{ revealButtonHref }}
https://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
https://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
https://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
https://github.com/google/python-fire/pull/144/files#diff-8396e29f81b1db73268b7723f968e8fbef21207aa3b05626ba2d33c2f3723d54
fire/completion_test.pyhttps://github.com/google/python-fire/pull/144/files#diff-65a2d8f939b7cb6969175a3c2d684afb3e74691b2a92c6ce968e84d2be324704
View file https://github.com/meshde/python-fire/blob/da780bc676017f259989a0a4e0754b4521b6d6e1/fire/completion_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/google/python-fire/pull/144/{{ revealButtonHref }}
https://github.com/google/python-fire/pull/144/files#diff-65a2d8f939b7cb6969175a3c2d684afb3e74691b2a92c6ce968e84d2be324704
https://github.com/google/python-fire/pull/144/files#diff-65a2d8f939b7cb6969175a3c2d684afb3e74691b2a92c6ce968e84d2be324704
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.