If I want to search for a directory or symlinks, I can do the following in bash:
find . \( -type d -o -type l \) -maxdepth 1
The same command doesn't work in ZSH:
find: missing argument to `-type'
): No such file or directory
-maxdepth: No such file or directory
1: No such file or directory
So I guess some more escaping or similar is needed. Is there a way to specify this command so that it works in both - ZSH and bash?
Here the output of setopt in ZSH:
alwaystoend
autocd
autopushd
nobeep
nocheckjobs
completeinword
extendedhistory
noflowcontrol
histexpiredupsfirst
histfindnodups
histignorealldups
histignoredups
histignorespace
histsavenodups
histverify
nohup
incappendhistory
interactive
interactivecomments
longlistjobs
monitor
promptsubst
pushdignoredups
pushdminus
sharehistory
shinstdin
zle
My ZSH version is: zsh 5.8 (x86_64-ubuntu-linux-gnu)
Of course, I'm using Oh My Zsh.