[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"autocd" shell option breaks on dir names beginning with hyphen

From: Charles Daffern
Subject: "autocd" shell option breaks on dir names beginning with hyphen
Date: Tue, 28 Apr 2015 19:05:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib 
-D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong --param=ssp-buffer-size=4
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
uname output: Linux kirisame #1 SMP PREEMPT
Mon Apr 13 05:57:41 BST 2015 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.3
Patch Level: 33
Release Status: release

    While "autocd" is active, giving bash the name of a directory
beginning with a dash will cause that directory to be interpreted as a
switch to "cd".

    1. $ mkdir test_dir && cd test_dir
    2. $ mkdir -- --
    3. $ shopt -s autocd
    4. Note current working directory
    5. $ --
    6. Note current working directory. It should be [...]/test_dir/--,
but it is your home directory.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]