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

Re: [StGit PATCH 1/2] Update the bash prompt from 'applied' instead of the obsolete 'current'

From
Yann Dirson <ydirson@altern.org>
Date
May 20, 2007, 20:46 UTC
Message-ID
<20070520204627.GR19253@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<20070520200403.14633.26644.stgit@lathund.dewire.com>

Note that "tail -1" gives a warning with newer versions, "tail -n 1" should be the proper call.

Also I'm not sure it is a good way to look at "applied" file, since Karl IIRC has plans to change this. Better call "stg top" and not touch that again :)

On Sun, May 20, 2007 at 10:04:03PM +0200, Robin Rosenberg wrote:
Show 29 quoted lines
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
> 
>  contrib/stgbashprompt.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh
> index 16bb39b..7c5dc76 100755
> --- a/contrib/stgbashprompt.sh
> +++ b/contrib/stgbashprompt.sh
> @@ -8,8 +8,8 @@ if [ "$PS1" ]; then
>  		git_dir=$(git-rev-parse --git-dir 2> /dev/null) || return
>  		ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
>  		br=${ref#refs/heads/}
> -		top=$(cat $git_dir/patches/$br/current 2>/dev/null) \
> -			&& top="/$top"
> +		top=$(tail -1 $git_dir/patches/$br/applied 2>/dev/null) \
> +			&& top="/$top";
>  		echo "[$br$top]"
>  	}
>  	PS1='\u@\h:$(__prompt_git)\W\$ '
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> !DSPAM:4650aff673931961316905!
> 
Previous: Robin RosenbergNext: Robin Rosenberg
Message 3 of 15 in “Bash prompt updates”
  1. 0/2 Bash prompt updatesRobin Rosenberg, May 20, 2007
  2. 1/2 Update the bash prompt from 'applied' instead of the obsolete 'current'Robin Rosenberg, May 20, 2007
  3. Yann DirsonMay 20, 2007
  4. 1/2 Update the bash prompt from 'applied' instead of the obsolete 'current'Robin Rosenberg, May 20, 2007
  5. Karl HasselströmMay 21, 2007
  6. Catalin MarinasMay 21, 2007
  7. Karl HasselströmMay 21, 2007
  8. Karl HasselströmMay 21, 2007
  9. Catalin MarinasMay 21, 2007
  10. Karl HasselströmMay 21, 2007
  11. Catalin MarinasMay 22, 2007
  12. Karl HasselströmMay 22, 2007
  13. Yann DirsonMay 21, 2007
  14. 2/2 Don't use / as separatar since it is common i branch namesRobin Rosenberg, May 20, 2007
  15. 2/2 Don't use / as separatar since it is common i branch namesRobin Rosenberg, May 20, 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.