【问题标题】:zsh/mercurial help on every command每个命令的 zsh/mercurial 帮助
【发布时间】:2014-10-24 06:09:22
【问题描述】:

在 zsh 中我在终端中执行的每个命令都会附加 mercurial 帮助。 示例:

$ ls
Applications   Developer      Library        Pictures       VirtualBox VMs
Consensus      Documents      Movies         Projects
Desktop        Downloads      Music          Public

haaduken at nachi in ~Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge working directory with another revision
 pull          pull changes from the specified source
 push          push changes to the specified destination
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details
$

我完全不知道为什么。有什么想法可以阻止这种情况吗?很多人都在说别名,但 hg 根本不在我的别名列表中。

【问题讨论】:

    标签: terminal mercurial zsh


    【解决方案1】:

    您是否在 PS1 变量中添加了 Mercurial 命令?有些人这样做是为了显示当前的分支或书签。 'echo $PS1' 显示什么?

    您可能在那里添加了不正确的 Mercurial 命令,导致打印帮助消息。

    【讨论】:

    • $ echo $PS1 %{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) $(virtualenv_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ hg_prompt_info 看起来很有希望。
    • 很可能,hg_prompt_info 是您的 .zshrc 或其他点文件中的一个函数。如果你能找到它,那可能就是导致问题的原因。
    • 好吧,经过将近一年的时间,我终于找到了问题所在。这是我使用的主题。它里面有 hg_prompt_info。谢谢@mathiasdm
    • 哇,很高兴能在一年后提供帮助 :-) 在那之后看到这个真是令人印象深刻。
    猜你喜欢
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-20
    相关资源
    最近更新 更多