I'm trying to use simple command substitution in zsh to cd
to the output of another command ( which
with dirname
).
which git
→ /usr/bin/git
as expected; dirname $(which git)
→ /usr/bin
as expected; cd $(dirname $(which git))
→ cd: no such file or directory: ^[[0m^[[0m/usr/bin
What's happening here? What is ^[[0m
and why is it showing up all of a sudden?
删除~/.zshrc
这一行~/.zshrc
它:
trap 'printf "\\e[0m" "$_"' DEBUG
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.