Closed theclapp closed 2 years ago
Also, it doesn't like sockets. Could be the same bug, though.
% gosh
$ pwd
/tmp
$ ls -la
total 0
drwxrwxrwt 10 root wheel 320 Mar 22 08:32 .
drwxr-xr-x 6 root wheel 192 Jan 1 2020 ..
drwx------ 3 lmc wheel 96 Feb 8 09:12 .vbox-lmc-ipc
drwx------ 3 lmc wheel 96 Jan 18 08:59 com.apple.launchd.MaQaVePSF0
drwx------ 3 lmc wheel 96 Jan 18 08:59 com.apple.launchd.Mkn79cVqM0
drwxr-xr-x 2 lmc wheel 64 Mar 19 13:01 com.google.Keystone
drwxr-xr-x 2 lmc wheel 64 Mar 19 13:01 dir
srw------- 1 lmc wheel 0 Mar 19 16:16 drivefs_ipc.501
srw------- 1 lmc wheel 0 Mar 19 16:16 drivefs_ipc.501_shell
drwxr-xr-x 2 root wheel 64 Mar 20 12:26 powerlog
$ echo **
com.apple.launchd.MaQaVePSF0 com.apple.launchd.Mkn79cVqM0 com.google.Keystone dir drivefs_ipc.501 drivefs_ipc.501_shell powerlog
$ shopt -s globstar
$ echo **
open /tmp/drivefs_ipc.501: operation not supported on socket
Hmm, is this a recent regression? It could be caused by my trick to use ReadDir instead of Stat for globbing.
Dunno. Haven't played with globbing much. I'm working on completion in my gui shell so now it's coming up a lot more. :)
echo **/
seems to work, though it prepends a space?
% gosh
$ pwd
/tmp
$ shopt -s globstar
$ ls -la
total 0
drwxrwxrwt 10 root wheel 320 Mar 22 08:32 .
drwxr-xr-x 6 root wheel 192 Jan 1 2020 ..
drwx------ 3 lmc wheel 96 Feb 8 09:12 .vbox-lmc-ipc
drwx------ 3 lmc wheel 96 Jan 18 08:59 com.apple.launchd.MaQaVePSF0
drwx------ 3 lmc wheel 96 Jan 18 08:59 com.apple.launchd.Mkn79cVqM0
drwxr-xr-x 2 lmc wheel 64 Mar 19 13:01 com.google.Keystone
drwxr-xr-x 2 lmc wheel 64 Mar 19 13:01 dir
srw------- 1 lmc wheel 0 Mar 19 16:16 drivefs_ipc.501
srw------- 1 lmc wheel 0 Mar 19 16:16 drivefs_ipc.501_shell
drwxr-xr-x 2 root wheel 64 Mar 20 12:26 powerlog
$ echo **/
com.apple.launchd.MaQaVePSF0/ com.apple.launchd.Mkn79cVqM0/ com.google.Keystone/ dir/ powerlog/
$
Thanks, I can easily reproduce both failures. The good news is that this is not a regression; I get exactly the same failures if I revert the recent change to replace Stat with ReadDir.
On macOS, in case it matters (and wasn't obvious from the PWD :).