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

Re: [PATCH] Update bash completions to prevent unbound variable errors.

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Jan 12, 2009, 21:38 UTC
Message-ID
<200901121538.43400.bss@iguanasuicide.net>
In-Reply-To
<20090112213149.GL10179@spearce.org>
On Monday 2009 January 12 15:31:49 Shawn O. Pearce wrote:
Show 7 quoted lines
>"Boyd Stephen Smith Jr." <bss@iguanasuicide.net> wrote:
>> Well, if the user want to run in "set -u" mode preventing it is bogus,
>> IMO. We could use subshells and unset at the top of _git and _gitk
>> functions, that would be only a +6/-4 patch.  It would also not be
>> something future contributors have to think (much) about.
>
>Running in subshells is a bad idea.

Yeah, not only for all the reasons you mention, but because it would require refactoring to use -C instead of -F (so we a longer and uglier patch); our changes to COMPREPLY in the subshell wouldn't be seen by bash.

Having tripped over my lack of experience twice in two messages in this thread, I'm going to bow out of the rest of it. My ascetic opinion still stands, but I'll take working code, warts and all, over broken code.

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     
Previous: Shawn O. PearceNext: Ted Pavlic
Message 6 of 14 in “Update bash completions to prevent unbound variable errors.”
  1. Update bash completions to prevent unbound variable errors.Ted Pavlic, Jan 12, 2009
  2. Boyd Stephen Smith Jr.Jan 12, 2009
  3. Adeodato SimóJan 12, 2009
  4. Boyd Stephen Smith Jr.Jan 12, 2009
  5. Shawn O. PearceJan 12, 2009
  6. Boyd Stephen Smith Jr.Jan 12, 2009
  7. Ted PavlicJan 12, 2009
  8. Ted PavlicJan 12, 2009
  9. Shawn O. PearceJan 12, 2009
  10. Ted PavlicJan 12, 2009
  11. Adeodato SimóJan 12, 2009
  12. Ted PavlicJan 12, 2009
  13. Adeodato SimóJan 12, 2009
  14. Adeodato SimóJan 12, 2009

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.