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

Re: ~ and ^

From
Sean <seanlkml@sympatico.ca>
Date
May 13, 2007, 19:49 UTC
Message-ID
<20070513154905.36da94e1.seanlkml@sympatico.ca>
In-Reply-To
<20070513191350.GB14657@diana.vm.bytemark.co.uk>

On Sun, 13 May 2007 21:13:50 +0200 Karl Hasselström <kha@treskal.com> wrote:

> It seems that ~foo is only expanded to foo's home if there is such a
> user. Since all-numeric users probably aren't common, we can probably
> get away with it.

Someone just mentioned to me that ~# is expanded by Bash if you use the pushd command to keep a directory stack. So ~1 will stop working if you use "pushd". Maybe it'd be more confusing than helpful. On the other hand, there's probably no reason for Git to just give an error message if it receives a properly escaped lone "~", "~#", or "^".

Sean
Previous: Karl HasselströmNext: Sean
Message 4 of 6 in “~ and ^”
  1. SeanMay 13, 2007
  2. Junio C HamanoMay 13, 2007
  3. Karl HasselströmMay 13, 2007
  4. SeanMay 13, 2007
  5. SeanMay 13, 2007
  6. Robin RosenbergMay 13, 2007

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.