git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 4/4] completion: be nicer with zsh

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 30, 2012, 19:03 UTC
Message-ID
<20120130190321.GD22549@burratino>
In-Reply-To
<CAMP44s1SzE1h+4Eoebr2LrnLNgFX1UE2+O8z6yYDuukmaijf7Q@mail.gmail.com>
Felipe Contreras wrote:
> On Mon, Jan 30, 2012 at 8:25 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 6 quoted lines
>> : is a no-op command.  It does not redirect stderr automatically or
>> do any other magical thing.
>
> Why don't you go ahead and try it?
>
> bash -c ': echo "err" > /dev/stderr'

: is a no-op command. If you have any questions after reading about it in your manual or online help system of choice, I'll be happy to answer them.

[...]
> Maybe '[' then.
Honestly, I don't care. :)

(If I had to choose a convention for scripts specific to ksh-style shells, in order of preference, I would rank them:

 1. Always use [[.
 2. Use "test", spelled out, like the portable shell code in git does.
 3. Use [.

If you have arguments for one convention or another that are compelling enough that the codebase won't be flipping back and forth and a patch to go along with them, I imagine no one will mind.)

By the way, since I forget to say enough: thanks for taking care about this code. Simpler code is definitely a good thing.

Regards, Jonathan

Previous: Felipe ContrerasNext: Junio C Hamano
Message 14 of 17 in “completion: trivial cleanups”
  1. 0/4 completion: trivial cleanupsFelipe Contreras, Jan 30, 2012
  2. 2/4 completion: remove unused codeFelipe Contreras, Jan 30, 2012
  3. Jonathan NiederJan 30, 2012
  4. Junio C HamanoJan 30, 2012
  5. Jonathan NiederJan 30, 2012
  6. Junio C HamanoJan 30, 2012
  7. Junio C HamanoJan 30, 2012
  8. SZEDER GáborJan 31, 2012
  9. Jonathan NiederJan 31, 2012
  10. Jonathan NiederJan 30, 2012
  11. Felipe ContrerasJan 30, 2012
  12. Jonathan NiederJan 30, 2012
  13. Felipe ContrerasJan 30, 2012
  14. Jonathan NiederJan 30, 2012
  15. Junio C HamanoJan 30, 2012
  16. Felipe ContrerasJan 30, 2012
  17. Jonathan NiederJan 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.