[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash silently ignores additional arguments for cd
From: |
hanzl |
Subject: |
bash silently ignores additional arguments for cd |
Date: |
Wed, 7 Dec 2011 14:21:30 +0100 (CET) |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2
uname output: Linux mepi 2.6.22-1-mepis-smp #1 SMP PREEMPT Sun Nov 11 15:54:46
EST 2007 i686 GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 4.2
Patch Level: 0
Release Status: release
Description:
cd silently ignores additional arguments
pwd, pushd and popd also do ignore additional arguments
This seemes to be a long standing behavior, it is the same in bash
3.1.17.
Problem is also described here:
http://old.nabble.com/cd-with-multiple-arguments--td30418151.html
This bug is mostly benign, however missing newline at the end of a cd
command leads to
silent skip of the following command line. Error report would help here.
Repeat-By:
cd xxx yyy
No error is reported for yyy.
Fix:
Make bash to report error for superfluous arguments for cd, pwd, pushd
and popd.
Alternatively, describe current behavior in bash man page (and
preferably
explain - maybe it is required for compatibility with some historical
shell?)
- bash silently ignores additional arguments for cd,
hanzl <=