This file is pushd.def, from which is created pushd.c. It implements the
builtins "pushd", "popd", and "dirs" in Bash.
-Copyright (C) 1987-2009 Free Software Foundation, Inc.
+Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
#if defined (PUSHD_AND_POPD)
#include <stdio.h>
-#ifndef _MINIX
+#if defined (HAVE_SYS_PARAM_H)
# include <sys/param.h>
#endif
{
sh_invalidnum (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
}
if (direction == '-')
{
sh_invalidopt (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
}
else
break;
{
sh_invalidnum (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
}
which_word = list->word->word;
}
{
sh_invalidopt (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
+ }
+ else if (*list->word->word)
+ {
+ builtin_error (_("%s: invalid argument"), list->word->word);
+ builtin_usage ();
+ return (EX_USAGE);
}
else
break;
{
sh_invalidnum (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
}
sign = (*list->word->word == '+') ? 1 : -1;
desired_index = get_dirstack_index (i, sign, &index_flag);
{
sh_invalidopt (list->word->word);
builtin_usage ();
- return (EXECUTION_FAILURE);
+ return (EX_USAGE);
}
}