commit bash-20040121 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 12:53:44 -05:00
parent 43cdcad8f4
commit 12d937f9af
59 changed files with 28288 additions and 946 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
/* Yacc grammar for bash. */
/* Copyright (C) 1989-2002 Free Software Foundation, Inc.
/* Copyright (C) 1989-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -4070,7 +4070,7 @@ decode_prompt_string (string)
case 'W':
{
/* Use the value of PWD because it is much more efficient. */
char t_string[PATH_MAX];
char t_string[PATH_MAX], *t;
int tlen;
temp = get_string_value ("PWD");
@@ -4094,7 +4094,8 @@ decode_prompt_string (string)
#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
if (c == 'W')
/* Abbreviate \W as ~ if $PWD == $HOME */
if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
{
if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
{