So I ran into this very annoying quality of Zsh that it treats certain characters differently in the middle of a command (at least I believe that’s the reason for this unexpected behavior):
john --format=bitlocker-opencl --mask=?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d ~/bitl-recoverypw-hash
zsh: no matches found: --mask=?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]?d?d?d?d?d?d
I tried escaping all the ?
with a backslash:
--mask=\?d\?d\?d\?d\?d\?d[-]\?d\ //and so on
=> same error, quoting my input without the backslashes though.
No I tried to switch to Bash doing this:
su
chsh -s /bin/bash root
chsh -s /bin/bash ben
but, for some reason:
➜ ~ echo $0
/bin/zsh
Apparently, my shell is still Zsh. The only effect chsh
apparently had was that the command prompt no looks differently, it changed from the Manjaro logo with the house icon to just this: ➜ ~
Questions:
- Is Zsh’s different interpretation of characters actually the reason for “zsh: no matches found” or did someone on stackexchange just fool me?
- If yes, how to correctly switch between Zsh and Bash?
EDIT: Maybe this has some sort of significance:
➜ ~ cat /etc/shells
# Pathnames of valid login shells.
# See shells(5) for details.
/bin/sh
/bin/bash
/bin/zsh
/usr/bin/zsh
/usr/bin/git-shell
/usr/bin/bash
seems to be missing?
EDIT2: I also tried wrapping the string in double quotes like so --mask="?d?d?d?d?d?d[-]?d?d?d?d?d?d[-]"
, which does make zsh happy and causes the command to run, but it results in errors that make no sense, so I’m not sure if the program interprets it as intended and wanted to eliminate that possibility by using bash with no need for extra characters.