哦-my-zsh无法在mac上启动

时间:2016-09-28 00:00:33

标签: macos oh-my-zsh

我按照http://ohmyz.sh/的建议安装了oh-my-zsh。 仅供参考,

[~]$ zsh --version
zsh 5.0.8 (x86_64-apple-darwin15.0)
[~]$ echo $SHELL
/bin/zsh
[~]$ ls .oh-my-zsh/
LICENSE.txt  cache        lib          oh-my-zsh.sh templates    tools
README.md    custom       log          plugins      themes

只有当我输入" zsh"然后我可以看到哦-my-zsh提示符如下:

[~]$ zsh
➜  ~ 

另外,我尝试将默认shell更改为zsh:

[~]$ chsh -s /bin/zsh
Changing shell for myUserName.
Password for myUserName: 
chsh: no changes made

每当我启动mac终端时,如何直接使用oh-my-zsh?

5 个答案:

答案 0 :(得分:10)

不仅在System Pref>用户和组> ...>用户个人资料的shell设置中,而且在Mac的终端> Preference> ChosenProfile> Shell部分,我不得不将/ bin / bash更改为/ bin / zsh。之后,它的作品!谢谢,@ RemyJ!

答案 1 :(得分:6)

您必须将默认shell更改为zsh 为此,请使用以下命令。

if (DateTime.IsLeapYear(year)) { //do stuff }
重启你的终端

我是从here取得的 这些是我安装zsh时遵循的步骤 我希望它也会对你有所帮助。

答案 2 :(得分:1)

在终端中运行以下命令:

xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"

答案 3 :(得分:0)

  

此外,我尝试将默认外壳程序更改为zsh:   [〜] $ chsh -s / bin / zsh

尝试

/// Convert CMTime to TimeInterval
///
/// - Parameter time: CMTime
/// - Returns: TimeInterval
func cmTimeToSeconds(_ time: CMTime) -> TimeInterval? {
    let seconds = CMTimeGetSeconds(time)
    if seconds.isNaN {
        return nil
    }
    return TimeInterval(seconds)
}

对我来说很好

答案 4 :(得分:0)

我遇到了类似的问题,但是我通过在终端中执行命令chsh -s /bin/zsh 解决了,然后导航到

终端->首选项->常规窗口

并将 Shells with with 打开选项更改为默认登录shell ,而命令(完整路径)设置为 / bin / zsh 。这应该可以解决您的问题。

相关问题