Repository navigation
Post-merge fixes for https://github.com/containers/toolbox/pull/840 - #1055
Conversation
Cobra provides a default command 'completion' that is always visible. The reverted change caused an additional command 'completion' to show up in the list because the then called command '__completion' didn't override the default one. This became apparent due to d69ce67 dynamically generating completion arguments for the 'help' command. This reverts commit 4469774. containers#1055
Requiring having a shell installed at build-time to get the appropriate location won't cover the cases like when a system has such a location set to a non-standard path. The use of fallbacks together with hardcoded paths also increases the complexity of this particular feature. All 3 major shells (Bash, Zsh, Fish) have documented default directories where they look for completion scripts and we can make use of that. Additionaly, hard-coding of these paths seems to be the standard among projects. Fallout from containers#840 containers#1055
We don't provide completion for PowerShell, we support only Linux and instructions for loading completion files are redundant in Toolbx. Fallout from containers#840 containers#1055
7487c37 to
1d60d82
Compare
V1 is legacy since v1.2.0[0]. [0] https://github.com/spf13/cobra/releases/tag/v1.2.0 Fallout from containers#840 containers#1055
While the use of Logrus is convenient, it causes unneeded fluff to be printed during a panic which distracts from finding the cause of the panic in the first place. Fallout from containers#840 containers#1055
|
Build failed. ❌ unit-test RETRY_LIMIT in 6m 54s |
|
This fail is truly confusing to me. My local machine has no problem with it. If I don't find a solution soon, I'll just drop most of a30f76c. |
|
Ah, ok. This is the same as #840 (comment). Will fall back to the previous approach of invoking |
Requiring having a shell installed at build-time to get the appropriate location won't cover the cases like when a system has such a location set to a non-standard path. The use of fallbacks together with hardcoded paths also increases the complexity of this particular feature. All 3 major shells (Bash, Zsh, Fish) have documented default directories where they look for completion scripts and we can make use of that. Additionaly, hard-coding of these paths seems to be the standard among projects. Fallout from containers#840 containers#1055
We don't provide completion for PowerShell, we support only Linux and instructions for loading completion files are redundant in Toolbx. Fallout from containers#840 containers#1055
1d60d82 to
cf9f09e
Compare
V1 is legacy since v1.2.0[0]. [0] https://github.com/spf13/cobra/releases/tag/v1.2.0 Fallout from containers#840 containers#1055
While the use of Logrus is convenient, it causes unneeded fluff to be printed during a panic which distracts from finding the cause of the panic in the first place. Fallout from containers#840 containers#1055
|
Build succeeded. ✔️ unit-test SUCCESS in 6m 59s |
While the use of Logrus is convenient, it causes unneeded fluff to be printed during a panic which distracts from finding the cause of the panic in the first place. Fallout from d69ce67 containers#1055
debarshiray
left a comment
There was a problem hiding this comment.
I split this commit to make the completion depend on the Toolbx binary to #1115
debarshiray
left a comment
There was a problem hiding this comment.
I split the typo fix for ZSH completions to #1118
Bash completion v2 was introduced in Cobra v1.2.0 and v1 will be deprecated in the future: https://github.com/spf13/cobra/releases/tag/v1.2.0 Since Toolbox already requires Cobra >= v1.3.0, it's better to use the new Bash completion. Fallout from d69ce67 containers#1055
Bash completion v2 was introduced in Cobra v1.2.0 and v1 will be deprecated in the future: https://github.com/spf13/cobra/releases/tag/v1.2.0 Since Toolbox already requires Cobra >= v1.3.0, it's better to use the new Bash completion. Fallout from d69ce67 containers#1055 containers#1119
There was a problem hiding this comment.
I split the switch to Cobra's Bash completion v2 into #1119
Cobra provides a default command 'completion' that is always visible. The reverted change caused an additional command 'completion' to show up in the list because the then called command '__completion' didn't override the default one. This became apparent due to d69ce67 dynamically generating completion arguments for the 'help' command. This reverts commit 4469774. containers#1055
Cobra provides a default command 'completion' that is always visible. The reverted change caused an additional command 'completion' to show up in the list because the then called command '__completion' didn't override the default one. This became apparent due to d69ce67 dynamically generating completion arguments for the 'help' command. This reverts commit 4469774. containers#1055 containers#1121
I took the liberty to also include the |
debarshiray
left a comment
There was a problem hiding this comment.
Instead of hard-coding the locations for the shell completions, we should have build options to override them. See #840 (comment)
I have tried this in #1123
|
I have merged all the commits in this pull request, except this one: ... which is related to the two unresolved conversations above. I don't feel qualified to fix it up, and since I am about to go on vacation, I don't have time anyway. So, I will leave it to you. I found two new problems with #840 Feel free to address them in this pull request, if you want to. |
There's not much to fix, only to drop :).
Okay 👍. |
cf9f09e to
5181939
Compare
|
Build succeeded. ✔️ unit-test SUCCESS in 7m 14s |
5181939 to
fe63222
Compare
|
Build succeeded. ✔️ unit-test SUCCESS in 8m 40s |
|
Thanks for all the fixes, @HarryMichal ! |
No description provided.