【问题标题】:dotfiles errors | /Users/marif/.aliases:79: bad option: -t点文件错误 | /Users/marif/.aliases:79:错误选项:-t
【发布时间】:2013-05-14 22:02:14
【问题描述】:

我对 OSX 还很陌生,但一切都差不多安定下来了,我之前配置了 Z 和 ZSH,最近从 https://github.com/paulirish/dotfiles 了解了 paulirish dot 文件并安装了它。

刷新 .bash_profile 或 .bashrc 时会看到以下输出

Last login: Tue May 14 08:41:35 on console
ls
➜  ~  ls
Applications    Downloads       Music           Samsung         dotfiles        log
Desktop         Library         Pictures        Sites           install-deps.sh readme.md
Documents       Movies          Public          bin             js-boilerplate
➜  ~  z
zsh: command not found: z
➜  ~  source ~/.bash_profile
/Users/marif/.aliases:79: bad option: -t
/Users/marif/.aliases:82: bad option: -t
/Users/marif/.functions:37: parse error near `]]'
/Users/marif/.bash_profile:.:9: no such file or directory: /Users/marif/code/z/z.sh
/Users/marif/.bash_profile:15: command not found: shopt
/Users/marif/.bash_profile:26: command not found: complete
\[\e]2;/Users/marif\[\a\]\[\e]1;\]Users/\W\[\a\]marif at   \[\]\w\[\]\[\]\[\]\n$ \[\]

我不知道这里出了什么问题,如果有人指出我在我的个人资料中持续存在问题或其他问题,我会有所帮助。

【问题讨论】:

    标签: macos terminal zsh dotfiles


    【解决方案1】:

    zsh 不是 bash,当我启动“zsh”时,我看到与您相同的错误:

    [/tmp]:;zsh
    ElvisIsAliveAndWell-2% type -t
    zsh: bad option: -t
    

    这些 paulirish 点文件旨在与 bash 一起使用。要么使用 bash,要么你需要移植 dot 文件中抛出错误的行,以便它们在 zsh 中工作(如果你这样做,你可以分叉或分支或建议对 PaulIrish 进行更改,以便他可以拿起这些更改并将它们提供给其他感兴趣的人)。

    【讨论】:

    • 非常感谢 Michael,你说得对,实际上我使用的是 zsh 并将其更改为 bash,现在在 OSX 上一天比一天好 :)
    猜你喜欢
    • 2014-04-25
    • 1970-01-01
    • 2017-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多