-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement auto-completion #56
Labels
bash
CLI
IDEasy command-line-interface (parsing args, etc.)
commandlet
completion
auto-completion in bash or build in CLI
enhancement
New feature or request
Milestone
Comments
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Oct 23, 2023
added jline license added jansi license
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Oct 24, 2023
added jline.version property to pom fixed context based help command removed AnsiConsole
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Oct 31, 2023
removed SystemRegistry and replaced with IdeCompleter added options completion added version completion added tool completion
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Oct 31, 2023
added tests using tab completion
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Oct 31, 2023
added version number sorting removed picocli example code
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 2, 2023
fixed javadoc
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 2, 2023
fixed version number sorting removed used option and alias removed jansi dependency
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 7, 2023
implemented first version of option completion with cleanup of used options converted commandletOptions from String to actual Property adjusted tests
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 7, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 7, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 7, 2023
added new constant for maximum results to display
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 7, 2023
adjusted visibility of applyAndRun to private
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 20, 2023
added setLogLevel method to AbstractIdeContext added loggerFactory class variable to AbstractIdeContext
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 20, 2023
added test for prevention of options after command added test which handles options before a command
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 20, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 21, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 21, 2023
renamed ReaderTestSupport to AutocompletionReaderTestSupport
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 21, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Nov 21, 2023
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Dec 12, 2023
split pattern into several parts added patternCompiled constant changed checkInvalidPattern param to String
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Dec 14, 2023
made sure that all exceptions get catched and reported with an error message
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Dec 14, 2023
moved check for invalid patterns to the top to stop autocomplete early before doing other stuff
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Dec 14, 2023
added another try block for catching run CLI exceptions
hohwille
added
completion
auto-completion in bash or build in CLI
CLI
IDEasy command-line-interface (parsing args, etc.)
labels
Jan 4, 2024
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
renamed initializeJlineCompletion to runWithInteractiveCompletion and adjusted comments
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
replaced redundant code with setLogLevel(minLogLevel)
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
adjusted TODO's (added link to issues) removed commented code moved processCliArgument into else block added error codes in case of exceptions changed runWithInteractiveCompletion from void to int to be able to use error codes
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
replaced Throwable with Exception renamed retrieveCliArgument to initContext
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
replaced -v and --version with VersionCommandlet fixed CTRL+D missing return and exit code added test for VersionCommandlet autocompletion
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
changed to more descriptive name and description
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 8, 2024
removed -v and --version
jan-vcapgemini
added a commit
to jan-vcapgemini/IDEasy
that referenced
this issue
Jan 9, 2024
removed CommandletRegistry
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 10, 2024
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 11, 2024
…start» and redesign CliArguments again as it does not feel consistent but rather hacky
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 15, 2024
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 22, 2024
jan-vcapgemini
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 23, 2024
fixed typo added TODO
hohwille
added a commit
that referenced
this issue
Jan 23, 2024
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 25, 2024
hohwille
added a commit
to hohwille/IDEasy
that referenced
this issue
Jan 26, 2024
This was referenced Feb 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bash
CLI
IDEasy command-line-interface (parsing args, etc.)
commandlet
completion
auto-completion in bash or build in CLI
enhancement
New feature or request
As a IDEasy user, I want to have command-line auto-completion so that I can be more productive and do not always have to read the help pages.
We had implemented this in devonfw-ide with manually bash scripts and the bash completion infrastructure.
My vision is that we pass the arguments to auto-complete directly into our Java main program.
So more or less
Ide complete «args»
would be called and we solve this with aCompleteCommandlet
.By finding the proper commandlet to invoke we can find its arguments and depending on their type automatically determine the possible options. That is why I prepared according specific
Property
sub-classes so that for aVersionProperty
we know that a version-number is to be passed and from out tool-commandlet to be invoked, we can figure out the possible and matching versions.BTW: This story is not easy and therefore not good for beginners. Also I learned that debugging auto-completion while using it is tricky as you can not use debug output to the console while pressing [Tab] key. It is therefore good to have an understanding of how auto-completion in bash works and then first have JUnits covering the different cases (completion of a single word where a prefix of that word is already given vs. a new word is started, etc.). If still some debugging is needed it is better to temporary write a log-file with the input and output of the auto-completion to later understand what went wrong and why... Good luck with this story :)
The text was updated successfully, but these errors were encountered: