[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cd: null directory
|
From: |
Lawrence Velázquez |
|
Subject: |
Re: cd: null directory |
|
Date: |
Wed, 30 Jul 2025 10:48:05 -0400 |
On Wed, Jul 30, 2025, at 4:52 AM, Michal Sojka wrote:
> Description:
> When running "cd ''", bash 5.3 fails with "cd: null directory"
> while previous versions succeeded without an error and no
> directory was changed. I'm not sure whether this is considered a
> bug or not.
It is not a bug.
> The SUS[1] says "If directory is an empty string,
> the results are unspecified.".
>
> [...]
>
> [1]:
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html
This was changed in POSIX.1-2024:
If _directory_ is an empty string, _cd_ shall write
a diagnostic message to standard error and exit with
non-zero status.
https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/cd.html#tag_20_14_05
https://www.austingroupbugs.net/view.php?id=1047
> However, I didn't find anything
> related to this change in the NEWS file for bash-5.3.
https://cgit.git.savannah.gnu.org/cgit/bash.git/tree/ChangeLog?h=bash-5.3#n9121
--
vq
- cd: null directory, Michal Sojka, 2025/07/30
- Re: cd: null directory, Stan Marsh, 2025/07/30
- Re: cd: null directory, microsuxx, 2025/07/30
- Re: cd: null directory, Robert Elz, 2025/07/30
- Re: cd: null directory, Phi Debian, 2025/07/31
- Re: cd: null directory, Andreas Kähäri, 2025/07/31
- Re: cd: null directory, Phi Debian, 2025/07/31
- Re: cd: null directory, Greg Wooledge, 2025/07/31
- Re: cd: null directory, Phi Debian, 2025/07/31
- Re: cd: null directory, Chet Ramey, 2025/07/31