-
Notifications
You must be signed in to change notification settings - Fork 123
KDB Complete: Minor Issues #1296
Comments
Thanks you, this is, as always, an excellent bug report!
Ok, definitely a bug, should complete to available namespaces.
Why do you want a cascading key to be completed to namespaces? Btw. why do you need max-depth in the auto-completion?
Maybe we should have a way to specify which of these 3 columns are needed with Can you also create a PR with your current state of the fish auto-completion? |
Do you mean
Yes, currently I want to write code that just completes a single level. I assume that there are a lot of situations, where completing multiple levels would not be something we want. For example, even if the
, then it would still make sense to offer partial completions for a command like
I think that makes sense if somebody wants this feature. Currently I can not think of a situation where this would be useful for the Fish completion commands though.
I will do that after I am more happy with the current state of the completion commands. |
Thanks for the report, you are right i haven't thought about initial namespace completion yet thus its not included. I'll add it, it makes sense to have that. I also think that it makes sense to always only complete the next level. @reox what do you think of listing the kind (node/leaf) and the number of children only when using -v? Do you need it per default for your completions? I think it makes sense to display it only when using -v, as is this is already some advanced information which is probably not necessary for normal completion. |
the number of nodes/leafs is probably not needed in the completion anyways. So having it only on -v is totaly fine for me! |
maybe I had something in mind, i do not remember anymore... sorry :/ the trailing / looks good, then you also do not need the leaf/node specifier |
See my changes in #1310 : |
General Description
Recently I continued my work on completion commands for Fish. I incorporated
kdb complete
to generate completions for the current namespace. However, the subcommandcomplete
does not work as expected in some situations. The following list summarizes some of the issues I found:.
Completion of First Level of Namespace Does Not Work
Steps to Reproduce the Issue
Enter the following command in a Terminal window:
kdb complete us
.
Expected Result
I expected that the command would show the following completion (or something similar):
.
Actual Result
The command fails showing the following output:
.
Provide Initial Completions for the Root Level of the Namespace
Steps to Reproduce the Issue
Start with a clean configuration
Enter the following commands in a Terminal window:
.
Enter the following command
kdb complete --max-depth=1
.
Expected Result
I would expect, that the command would complete the first level of the namespace and therefore output the following (or something similar):
.
Actual Result
The command fails printing the following error message:
Make Information About Number of Keys/Leafs optional
While I am pretty sure there is a valid reason why
kdb complete
also prints information about the number of subkeys, the Fish completion commands do not use this information at all. In fact the current completion commands strips this information usingsed
. It would be really nice ifkdb complete
could only print the information about the number of subkeys if we specify the switch-v
.System Information
master
The text was updated successfully, but these errors were encountered: