So, if I man cd
, I get the manpage for bash builtins.
If I cd -?
, I get the following:
cd -?
-bash: cd: -?: invalid option
cd: usage: cd [-L|[-P [-e]] [-@]] [dir]
I know what the first two options are. Then I searched for both options.
-e
option, I found this answer on the Unix StackExchange.-@
option, I couldn’t find any explanation. My system info:
However, if I run which cd
, I get /usr/bin/cd
. Homebrew doesn’t touch anything outside of /usr/local
, so I can only assume this is the system’s cd
.
But I can’t find the documentation for that option! It’s driving me crazy.
Does anyone know what -@
does?
It's a new option (as of bash-4.3). The changelog contains the following description:
'cd' has a new `-@' option to browse a file's extended attributes on systems that support O_XATTR.
Type help <name>
or man bash
to get more info on bash commands. (In the bash man page you can search for cd
by typing /
followed by a search string and enter. n
to go to the next hit, shift+n
to go backwards).
The bash man page contains the following:
On systems that support it, the -@ option presents the extended attributes associated with a file as a directory.