[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting "cdspell" does not return error in a non-interactive shell
From: |
Chris Down |
Subject: |
Setting "cdspell" does not return error in a non-interactive shell |
Date: |
Sun, 29 Dec 2013 02:39:07 +0800 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
From "man 1 bash" on 4.2.45:
cdspell If set, minor errors in the spelling of a directory com‐
ponent in a cd command will be corrected. The errors
checked for are transposed characters, a missing charac‐
ter, and one character too many. If a correction is
found, the corrected file name is printed, and the com‐
mand proceeds. This option is only used by interactive
shells.
Unless I am missing some reason why this is undesirable, it seems
sensible to return an error when attempting to set "cdspell" in a
non-interactive shell, in that case.
$ bash -c 'echo $-; shopt -s cdspell; echo $?'
hBc
0
pgpTJgsnY4agv.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Setting "cdspell" does not return error in a non-interactive shell,
Chris Down <=