mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-11 06:00:49 +02:00
commit bash-20040121 snapshot
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user