Re: js/no-pager-shorthand [was: What's cooking in git.git (Apr 2018, #04; Mon, 30)]
On Tue, May 01 2018, Johannes Schindelin wrote: > I wonder whether `-!p` would be better/feasible? In *nix shells `git -!p ...` unquoted will turn that !p into whatever command you last ran that started with a "p", in my case `git -ping 8.8.8.8`. So there's a reason that's not the idiom in any *nix CLI program (as opposed to +p which I think was mentioned in a side-thread)>
Re: js/no-pager-shorthand [was: What's cooking in git.git (Apr 2018, #04; Mon, 30)]
On Tue, May 1, 2018 at 10:58 AM, Johannes Sixt wrote: > Am 01.05.2018 um 13:57 schrieb Johannes Schindelin: >> On Mon, 30 Apr 2018, Johannes Sixt wrote: >>> Am 30.04.2018 um 05:25 schrieb Junio C Hamano: * js/no-pager-shorthand (2018-04-25) 1 commit - git: add -N as a short option for --no-pager >>> >>> I find -P is not that bad after all. >> >> To me, `-P` would suggest the positive action --pager rather than the >> negative --no-pager. > > >> Your use case is quite the corner case, I hope you realize that, as it >> seems that everybody else is fine with having -FRX as default options for >> `less`... And with copy/pasting from the `less` output. So introducing a >> sweet short option for --no-pager, for the benefit of maybe even only one >> user, seems quite... unusual. > > Given the ambivalence (or inconclusiveness), I retract this patch without > offering a replacement for the time being. Although paged output is generally nice, I frequently find myself typing --no-pager numerous times during the day, so I, for one, welcome having a short option (and would be sad to see this patch retracted). As with Hannes, I too find -P a reasonably intuitive and easy-to-remember short option.
Re: js/no-pager-shorthand [was: What's cooking in git.git (Apr 2018, #04; Mon, 30)]
Am 01.05.2018 um 13:57 schrieb Johannes Schindelin: Hi Hannes, On Mon, 30 Apr 2018, Johannes Sixt wrote: Am 30.04.2018 um 05:25 schrieb Junio C Hamano: * js/no-pager-shorthand (2018-04-25) 1 commit - git: add -N as a short option for --no-pager "git --no-pager cmd" did not have short-and-sweet single letter option. Now it does. Will merge to 'next'. I consider your argument that -N is only an abbreviation for an unspecific "no" a valid one. So, I would like to be sure that we are not painting us into the wrong corner by squatting -N for --no-pager. I find -P is not that bad after all. To me, `-P` would suggest the positive action --pager rather than the negative --no-pager. I wonder whether `-!p` would be better/feasible? We do not have this pattern, yet, nor do I know it from some other utility. I do not want to set a precedent. Your use case is quite the corner case, I hope you realize that, as it seems that everybody else is fine with having -FRX as default options for `less`... And with copy/pasting from the `less` output. So introducing a sweet short option for --no-pager, for the benefit of maybe even only one user, seems quite... unusual. Granted, you cannot simply introduce an alias for `git --no-pager`. But maybe that is what we should do? Maybe we should start supporting aliases without specifying commands, opening the door for things like `git -c ui.color=false`, too. Then you could add `alias.n=--no-pager` and call `git n show HEAD`, and the -N and -P short options could still wait for a widely-popular option to require a short name. But then I can just as well have alias gitn='git --no-pager' in my .bashrc. Maybe I should do that. Given the ambivalence (or inconclusiveness), I retract this patch without offering a replacement for the time being. Thanks for a bit of sanity, -- Hannes
Re: js/no-pager-shorthand [was: What's cooking in git.git (Apr 2018, #04; Mon, 30)]
Hi Hannes, On Mon, 30 Apr 2018, Johannes Sixt wrote: > Am 30.04.2018 um 05:25 schrieb Junio C Hamano: > > * js/no-pager-shorthand (2018-04-25) 1 commit > > - git: add -N as a short option for --no-pager > > > > "git --no-pager cmd" did not have short-and-sweet single letter > > option. Now it does. > > > > Will merge to 'next'. > > I consider your argument that -N is only an abbreviation for an unspecific > "no" a valid one. So, I would like to be sure that we are not painting us into > the wrong corner by squatting -N for --no-pager. > > I find -P is not that bad after all. To me, `-P` would suggest the positive action --pager rather than the negative --no-pager. I wonder whether `-!p` would be better/feasible? Your use case is quite the corner case, I hope you realize that, as it seems that everybody else is fine with having -FRX as default options for `less`... And with copy/pasting from the `less` output. So introducing a sweet short option for --no-pager, for the benefit of maybe even only one user, seems quite... unusual. Granted, you cannot simply introduce an alias for `git --no-pager`. But maybe that is what we should do? Maybe we should start supporting aliases without specifying commands, opening the door for things like `git -c ui.color=false`, too. Then you could add `alias.n=--no-pager` and call `git n show HEAD`, and the -N and -P short options could still wait for a widely-popular option to require a short name. Ciao, Dscho