简体   繁体   中英

mac terminal: `open -a ` doesn't work, Unable to find application named

After my mac shutdown by accident once, the terminal commend open -a doesn't work anywork. ( It's ok before that).

(base) ➜  tmp  $ open -a TextEdit .                                                                                                                                   [10:19:09]
Unable to find application named 'TextEdit'
(base) ➜  tmp  $ open -a textEdit ./livephoto.log                                                                                                                     [10:20:51]
Unable to find application named 'textEdit'
(base) ➜  tmp  $ open -a "Google Chrome"                                                                                                                              [10:21:17]
Unable to find application named 'Google Chrome'
(base) ➜  tmp  $ open -a "Safari"                                                                                                                                     [10:22:58]
Unable to find application named 'Safari'

What happend to it? How do I fix it?

The LaunchServices may require a rebuilding... The typical command is /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain u -domain s -domain l -v

The app can be opened by finder. Finally I found it's zsh bug. It still work in the terminal.app.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM