-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support tab completions #209
Merged
Merged
Commits on Apr 15, 2022
-
This is an initial effort to address #177 With this change, klog uses github.com/posener/complete and github.com/willabides/kongplete to generate completions for klog's own commands. There are two coordinated changes that make this feature work: 1. When the `COMP_LINE` environment variable is set, `klog` runs in a special command completion mode. It parses the value of `COMP_LINE` (the current command line), prints to stdout a list of possible completions based on what is on the command line so far, and exits early. 2. `klog completion` prints to stdout a code snippet that defines a completion specification in the current shell. When this code snippet is executed in a shell session, the shell will thereafter invoke the same `klog` executable (with the `COMP_LINE` environment variable set) to generate possible completions. For example, in bash, completions can be enabled by running source <(log completion) Once bash completions are enabled, pressing tab after typing "klog " klog [Tab] will present the available klog commands. In the current implementation, the generated completions are rudimentary and lack ergonomics. There is zero test coverage for this new feature. Because it relies on interaction with the shell, this feature is not easy to test.
Configuration menu - View commit details
-
Copy full SHA for 6091f12 - Browse repository at this point
Copy the full SHA 6091f12View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb0d497 - Browse repository at this point
Copy the full SHA cb0d497View commit details -
Configuration menu - View commit details
-
Copy full SHA for 508dba9 - Browse repository at this point
Copy the full SHA 508dba9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f57f7e7 - Browse repository at this point
Copy the full SHA f57f7e7View commit details
Commits on Jul 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for cade2ad - Browse repository at this point
Copy the full SHA cade2adView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7ef999 - Browse repository at this point
Copy the full SHA c7ef999View commit details
Commits on Jul 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ea6505e - Browse repository at this point
Copy the full SHA ea6505eView commit details
Commits on Aug 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 08cb5c7 - Browse repository at this point
Copy the full SHA 08cb5c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1915fc7 - Browse repository at this point
Copy the full SHA 1915fc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41d71a1 - Browse repository at this point
Copy the full SHA 41d71a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c73cba - Browse repository at this point
Copy the full SHA 0c73cbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c31c2b5 - Browse repository at this point
Copy the full SHA c31c2b5View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.