{"thread":{"id":"54593","subject":"Completion for aliases that wrap aliases that wrap Git commands","startedAt":"2020-11-06T22:42:50Z","lastAt":"2020-11-10T03:01:32Z","messageCount":3,"participants":["Philippe Blain","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"409304","messageId":"9717A684-9304-4A65-8566-19F946098455@gmail.com","threadId":"54593","inReplyTo":null,"subject":"Completion for aliases that wrap aliases that wrap Git commands","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-11-06T22:42:43Z","receivedAt":"2020-11-06T22:42:50Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hello all,\n\nI've noticed the following: I have a Git alias that is simply a Git command \nwith some options, like\n\n$ git config --get alias.logo\nlog --abbrev-commit --decorate --format=format:'%C(yellow bold)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ad)%C(reset) %C(auto)%d%C(reset)'\n\nAnd another alias that is this previous alias with more options:\n\n$ git config --get alias.lg\nlogo --first-parent\n\nWhen typing 'git logo up[TAB][TAB]', the Bash completion script\nsuggests 'upstream' (like if I type 'git log up[TAB][TAB]'),\nbut typing 'git lg up[TAB][TAB]' does not suggest anything.\n\nSo I'm thinking there is some special logic in the completion script that makes it \nwork for simple aliases but not for recursive aliases.\n\nI know nothing about Bash completions, but I'm wondering if that feature would\nbe possible at all ?\n\nThis is on Bash 4.4.19(1) (not that I think it matters very much...)\n\nCheers,\n\nPhilippe."},{"id":"409418","messageId":"CAMP44s3ZPJhej9JQir+Vo6LEQKDfgvJBVyUNPEEze0YTnTxU4g@mail.gmail.com","threadId":"54593","inReplyTo":"9717A684-9304-4A65-8566-19F946098455@gmail.com","subject":"Re: Completion for aliases that wrap aliases that wrap Git commands","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-09T21:56:32Z","receivedAt":"2020-11-09T21:56:45Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hello,\n\nOn Fri, Nov 6, 2020 at 4:46 PM Philippe Blain\n<levraiphilippeblain@gmail.com> wrote:\n\n> I know nothing about Bash completions, but I'm wondering if that feature would\n> be possible at all ?\n\nYeap. I just sent a patch for that:\n\nhttps://lore.kernel.org/git/20201109215248.461167-1-felipe.contreras@gmail.com/\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"409463","messageId":"6E9B97F3-43AC-431F-9B9C-5962F126F697@gmail.com","threadId":"54593","inReplyTo":"CAMP44s3ZPJhej9JQir+Vo6LEQKDfgvJBVyUNPEEze0YTnTxU4g@mail.gmail.com","subject":"Re: Completion for aliases that wrap aliases that wrap Git commands","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-11-10T03:01:21Z","receivedAt":"2020-11-10T03:01:32Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi Felipe,\n\n> Le 9 nov. 2020 à 16:56, Felipe Contreras <felipe.contreras@gmail.com> a écrit :\n> \n> Hello,\n> \n> On Fri, Nov 6, 2020 at 4:46 PM Philippe Blain\n> <levraiphilippeblain@gmail.com> wrote:\n> \n>> I know nothing about Bash completions, but I'm wondering if that feature would\n>> be possible at all ?\n> \n> Yeap. I just sent a patch for that:\n> \n> https://lore.kernel.org/git/20201109215248.461167-1-felipe.contreras@gmail.com/\n\nGreat! thanks.\n\nPhilippe."}]}