From 011c1d1c0766c65517ebd495465c99e86edb63ec Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Mon, 11 Oct 2010 14:49:26 -0700
Subject: Update to bash-4.1

---
 builtins/alias.def | 50 +++++++++++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 19 deletions(-)

(limited to 'builtins/alias.def')

diff --git a/builtins/alias.def b/builtins/alias.def
index 572910b..d760ceb 100644
--- a/builtins/alias.def
+++ b/builtins/alias.def
@@ -1,35 +1,43 @@
 This file is alias.def, from which is created alias.c
 It implements the builtins "alias" and "unalias" in Bash.
 
-Copyright (C) 1987-2004 Free Software Foundation, Inc.
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
 
 This file is part of GNU Bash, the Bourne Again SHell.
 
-Bash is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
-Bash is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License along
-with Bash; see the file COPYING.  If not, write to the Free Software
-Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+You should have received a copy of the GNU General Public License
+along with Bash.  If not, see <http://www.gnu.org/licenses/>.
 
 $BUILTIN alias
 $FUNCTION alias_builtin
 $DEPENDS_ON ALIAS
 $PRODUCES alias.c
 $SHORT_DOC alias [-p] [name[=value] ... ]
-`alias' with no arguments or with the -p option prints the list
-of aliases in the form alias NAME=VALUE on standard output.
+Define or display aliases.
+
+Without arguments, `alias' prints the list of aliases in the reusable
+form `alias NAME=VALUE' on standard output.
+
 Otherwise, an alias is defined for each NAME whose VALUE is given.
 A trailing space in VALUE causes the next word to be checked for
-alias substitution when the alias is expanded.  Alias returns
-true unless a NAME is given for which no alias has been defined.
+alias substitution when the alias is expanded.
+
+Options:
+  -p	Print all defined aliases in a reusable format
+
+Exit Status:
+alias returns true unless a NAME is supplied for which no alias has been
+defined.
 $END
 
 #include <config.h>
@@ -103,7 +111,7 @@ alias_builtin (list)
       free (alias_list);	/* XXX - Do not free the strings. */
 
       if (list == 0)
-	return (EXECUTION_SUCCESS);
+	return (sh_chkwrite (EXECUTION_SUCCESS));
     }
 
   any_failed = 0;
@@ -149,8 +157,12 @@ $BUILTIN unalias
 $FUNCTION unalias_builtin
 $DEPENDS_ON ALIAS
 $SHORT_DOC unalias [-a] name [name ...]
-Remove NAMEs from the list of defined aliases.  If the -a option is given,
-then remove all alias definitions.
+Remove each NAME from the list of defined aliases.
+
+Options:
+  -a	remove all alias definitions.
+
+Return success unless a NAME is not an existing alias.
 $END
 
 #if defined (ALIAS)
-- 
cgit v1.2.3

