{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":226584262,"defaultBranch":"master","name":"cobra","ownerLogin":"marckhouzam","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2019-12-07T22:30:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/414402?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1703430150.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"7da41a0be12ecbfd36a2ba6c523f7a9910ee91ef","ref":"refs/heads/gh-pages","pushedAt":"2023-12-24T15:02:30.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"update 769b0da920b7ddb190c059378360cf9f7e4e06ec","shortMessageHtmlLink":"update 769b0da"}},{"before":null,"after":"769b0da920b7ddb190c059378360cf9f7e4e06ec","ref":"refs/heads/pages-1984","pushedAt":"2023-12-24T15:01:59.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"ci: add GitHub Actions workflow 'site'","shortMessageHtmlLink":"ci: add GitHub Actions workflow 'site'"}},{"before":"cc107e9132e245c9d6350acbacb3c295bae638af","after":"15823e76b938fc3cfb94005d4ae3e1842e65f838","ref":"refs/heads/feat/improveBashActiveHelp","pushedAt":"2023-11-23T14:48:24.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Print ActiveHelp for bash along other completions\n\nIn the bash shell we used to print ActiveHelp messages on every\ntab-press. In the example below, notice the \"Command help\" line which is\nActiveHelp:\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u\nunset (Unset the active context so that it is not used by default.)\nuse (Set the context to be used by default)\nbash-5.1$ tanzu context u\n\nAbove, on the first [tab] press, only the ActiveHelp is printed.\nOn the second [tab] press, the ActiveHelp is printed again, followed\nby a re-print of the command-line, followed by the completions choices.\n\nThe separation between ActiveHelp and completion choices makes the\nActiveHelp harder to see. Furthermore, I find the double printing of the\nActiveHelp string to look bad.\n\nNote that for zsh, the UX is different and that ActiveHelp messages are\nprinted at the same time as the completion choices.\n\nThis commit aligns the UX for ActiveHelp in bash with the one for zsh:\nif there are other completions to be shown, the ActiveHelp messages are\nprinted at the same time.\n\nNew behaviour:\n1- ActiveHelp is no longer printed on the first [tab] press. This is\n better aligned with bash's standard approach.\n2- ActiveHelp is printed on the second [tab] press, above the completion\n choices, with a `--` delimiter.\n3- If there are no completion choices, the `--` delimiter is omitted.\n\nThis behaviour is the same as what is done for zsh (except that for zsh\nthe first [tab] press immediately shows completion choices).\n\nBelow is the above example, but using this commit.\nNotice the more concise and easier to read completion output:\n\nbash-5.1$ tanzu context u[tab][tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n--\nunset (Unset the active context so that it is not used by default.)\nuse (Set the context to be used by default)\nbash-5.1$ tanzu context u\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Print ActiveHelp for bash along other completions"}},{"before":"ad3854b303473cd03f49eb0cf896d7c6a7c3c025","after":"cc107e9132e245c9d6350acbacb3c295bae638af","ref":"refs/heads/feat/improveBashActiveHelp","pushedAt":"2023-11-23T14:46:31.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Print ActiveHelp for bash along other completions\n\nIn the bash shell we used to print ActiveHelp messages on every\ntab-press. In the example below, notice the \"Command help\" line which is\nActiveHelp:\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u\nunset (Unset the active context so that it is not used by default.)\nuse (Set the context to be used by default)\nbash-5.1$ tanzu context u\n\nAbove, on the first [tab] press, only the ActiveHelp is printed.\nOn the second [tab] press, the ActiveHelp is printed again, followed\nby a re-print of the command-line, followed by the completions choices.\n\nThe separation between ActiveHelp and completion choices makes the\nActiveHelp harder to see. Furthermore, I find the double printing of the\nActiveHelp string to look bad.\n\nNote that for zsh, the UX is different and that ActiveHelp messages are\nprinted at the same time as the completion choices.\n\nThis commit aligns the UX for ActiveHelp in bash with the one for zsh:\nif there are other completions to be shown, the ActiveHelp messages are\nprinted at the same time.\n\nNew behaviour:\n1- ActiveHelp is no longer printed on the first [tab] press. This is\n better aligned with bash's standard approach.\n2- ActiveHelp is printed on the second [tab] press, above the completion\n choices, with a `--` delimiter.\n3- If there are no completion choices, the `--` delimiter is omitted.\n\nThis behaviour is the same as what is done for zsh (except that for zsh\nthe first [tab] press immidately shows completion choices).\n\nBelow is the above example, but using this commit.\nNotice the more concise and easier to read completion output:\n\nbash-5.1$ tanzu context u[tab][tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n--\nunset (Unset the active context so that it is not used by default.)\nuse (Set the context to be used by default)\nbash-5.1$ tanzu context u\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Print ActiveHelp for bash along other completions"}},{"before":"ef9125755cf70d8f8df18dde53adaa598cd60254","after":"ad3854b303473cd03f49eb0cf896d7c6a7c3c025","ref":"refs/heads/feat/improveBashActiveHelp","pushedAt":"2023-11-23T14:40:04.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Print ActiveHelp for bash along other completions\n\nIn the bash shell we used to print ActiveHelp messages on every\ntab-press. In the example below, notice the \"Command help\" line which is\nActiveHelp:\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u[tab]\nCommand help: Configure and manage contexts for the Tanzu CLI\n\nbash-5.1$ tanzu context u\nunset (Unset the active context so that it is not used by default.)\nuse (Set the context to be used by default)\nbash-5.1$ tanzu context u\n\nOn the first [tab] press, only the ActiveHelp is printed.\nOn the second [tab] press, the ActiveHelp is printed again, followed\nby a re-print of the command-line, followed by the completions choices.\n\nThe separation between ActiveHelp and completion choices makes the\nActiveHelp harder to see. Furthermore, I find the double printing of the\nActiveHelp string to look bad.\n\nNote that for zsh, the UX is different and that ActiveHelp messages are\nprinted at the same time as the completion choices.\n\nWith this commit we align the UX for ActiveHelp in bash with the one for\nzsh: if there are other completions to be shown, the ActiveHelp messages\nare printed the same time.\n\nNew behaviour:\n1- ActiveHelp is no longer printed on the first [tab] press. This is\n better aligned with bash's standard approach.\n2- ActiveHelp is printed on the second [tab] press, above the completion\n choices, with a `--` delimiter.\n3- If there are no completion choices, the `--` delimiter is omitted.\n\nThis behaviour is the same as what is done for zsh (except that for zsh\nthe first [tab] press immidately shows completion choices).\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Print ActiveHelp for bash along other completions"}},{"before":"ca89f5dd24a0675e9592ac2e95ebdab068737c7e","after":"ef9125755cf70d8f8df18dde53adaa598cd60254","ref":"refs/heads/feat/improveBashActiveHelp","pushedAt":"2023-11-13T16:19:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Print ActiveHelp at the same time as other comps\n\nIf there are other completions to be shown, we print the ActiveHelp\nmessages at the same time instead of at the preceding tab-press. Such\nan approach provides a better UX where the ActiveHelp messages are\nvisible as if they were part of the real completions.\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Print ActiveHelp at the same time as other comps"}},{"before":null,"after":"ca89f5dd24a0675e9592ac2e95ebdab068737c7e","ref":"refs/heads/feat/improveBashActiveHelp","pushedAt":"2023-11-12T21:16:19.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Print ActiveHelp at the same time as other comps\n\nIf there are other completions to be shown, we print the ActiveHelp\nmessages at the same time instead of at the preceding tab-press. Such\nan approach provides a better UX where the ActiveHelp messages are\nvisible as if they were part of the real completions.\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Print ActiveHelp at the same time as other comps"}},{"before":"74f1665f7201a4d7e3a1c643bea540ea30a847c8","after":null,"ref":"refs/heads/fix/apiFlagComp","pushedAt":"2023-11-02T15:23:11.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}},{"before":null,"after":"74f1665f7201a4d7e3a1c643bea540ea30a847c8","ref":"refs/heads/fix/apiFlagComp","pushedAt":"2023-11-02T14:14:45.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Improve API to get flag completion function\n\nThe new API is simpler and matches the `c.RegisterFlagCompletionFunc()`\nAPI. By removing the global function `GetFlagCompletion()` we are more\nfuture proof if we ever move from a global map of flag completion\nfunctions to something associated with the command.\n\nThe commit also makes this API work with persistent flags by using\n`c.Flag(flagName)` instead of `c.Flags().Lookup(flagName)`.\n\nThe commit also adds unit tests.\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Improve API to get flag completion function"}},{"before":"33d6f8409d09a05e5ef14dc782cee8f0aa392b4f","after":null,"ref":"refs/heads/test/compGlobalFlags","pushedAt":"2023-10-28T20:12:03.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}},{"before":"d54a5abed28f49719b8f1f7b6610e7ecfc98e96b","after":null,"ref":"refs/heads/fix/compDoubleHelpFlag","pushedAt":"2023-10-28T20:10:10.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}},{"before":"28f6671ff1276117b29fe16a57ed6c88c0700c7a","after":"d54a5abed28f49719b8f1f7b6610e7ecfc98e96b","ref":"refs/heads/fix/compDoubleHelpFlag","pushedAt":"2023-10-27T13:51:18.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Don't complete --help flag when flag parsing disabled\n\nFixes #2060\n\nWhen a command sets `DisableFlagParsing = true` it requests the\nresponsibility of doing all the flag parsing. Therefore even the\n`--help/-f/--version/-v` flags should not be automatically completed\nby Cobra in such a case.\n\nWithout this change the `--help/-h/--version/-v` flags can end up being\ncompleted twice for plugins: one time from cobra and one time from the\nplugin (which has set `DisableFlagParsing = true`).\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Don't complete --help flag when flag parsing disabled"}},{"before":null,"after":"28f6671ff1276117b29fe16a57ed6c88c0700c7a","ref":"refs/heads/fix/compDoubleHelpFlag","pushedAt":"2023-10-27T13:49:15.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Don't complete --help flag when flag parsing disabled\n\nFixes #2060\n\nWhen a command sets `DisableFlagParsing = true` it requests the\nresponsibility of doing all the flag parsing. Therefore even the\n`--help/-f/--version/-v` flags should not be automatically completed\nby Cobra in such a case.\n\nWithout this change the `--help/-h/--version/-v` flags can end up being\ncompleted twice for plugins: one time from cobra and one time from the\nplugin (which has set `DisableFlagParsing = true`).\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Don't complete --help flag when flag parsing disabled"}},{"before":"4614907bee8c385978ab2e8215e3e3d87b0811f2","after":null,"ref":"refs/heads/fix/linter","pushedAt":"2023-10-27T10:23:48.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}},{"before":null,"after":"33d6f8409d09a05e5ef14dc782cee8f0aa392b4f","ref":"refs/heads/test/compGlobalFlags","pushedAt":"2023-10-23T13:49:18.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Add tests for flag completion registration\n\nDifferent problems have been reported about flag completion registration.\nThese two tests are the cases that were not being verified but had been\nmentioned as problematic.\n\nRef:\n- https://github.com/spf13/cobra/issues/1320\n- https://github.com/spf13/cobra/pull/1438#issuecomment-872928669\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Add tests for flag completion registration"}},{"before":null,"after":"4614907bee8c385978ab2e8215e3e3d87b0811f2","ref":"refs/heads/fix/linter","pushedAt":"2023-10-22T00:27:56.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"},"commit":{"message":"Fix linter errors\n\nWhen using golangci-lint v1.55.0 some new errors were being reported.\n\nSigned-off-by: Marc Khouzam ","shortMessageHtmlLink":"Fix linter errors"}},{"before":"652aadbeded9c38d7a5283b4df4a55f17ec78177","after":null,"ref":"refs/heads/fix/image","pushedAt":"2023-03-22T22:41:57.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}},{"before":"87d31cd1b1317185f8d7de49fd0b77648cacfea7","after":null,"ref":"refs/heads/feat/compZshSource","pushedAt":"2023-03-22T22:41:09.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"marckhouzam","name":"Marc Khouzam","path":"/marckhouzam","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/414402?s=80&v=4"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAD0UoI8wA","startCursor":null,"endCursor":null}},"title":"Activity ยท marckhouzam/cobra"}