zshell命令在macOS中名为“提示”?

墨累

我正在将zshell用于macOS Catalina(10.15.6)。《学习使用Zsh的Shell脚本》一书描述了名为的可执行命令prompt,其使用方式如下:

$ prompt -p
$ prompt -h
$ prompt <theme_name>
$ prompt adam1 red yellow magenta

但是zsh报告“找不到命令:提示符”。

我如何获得该命令或等效命令。

(我尝试搜索的所有地方都向我提供了指向地方的链接,这些地方解释了如何设置zsh提示符,以及所有常见的转义序列,“ $ ...”符号等)。

大卫·卡伦

来自man zshcontrib

PROMPT THEMES
   Installation
       You  should  make  sure  all  the  functions from the Functions/Prompts
       directory of the source distribution are available; they all begin with
       the  string `prompt_' except for the special function`promptinit'.  You
       also  need  the  `colors'  and  `add-zsh-hook'  functions  from   Func-
       tions/Misc.   All these functions may already be installed on your sys-
       tem; if not, you will need to find them and copy them.   The  directory
       should  appear  as  one of the elements of the fpath array (this should
       already be the case if they were installed), and at least the  function
       promptinit  should  be autoloaded; it will autoload the rest.  Finally,
       to initialize the use of the system you need  to  call  the  promptinit
       function.   The  following  code  in your .zshrc will arrange for this;
       assume the functions are stored in the directory ~/myfns:

              fpath=(~/myfns $fpath)
              autoload -U promptinit
              promptinit

因此,要获取prompt命令,您只需运行

$ autoload -U promptinit
$ promptinit

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在命令提示符下对名为%A%的文件进行操作

来自分类Dev

如何防止zshell中的命令保存到历史记录中?

来自分类Dev

命令提示中的Python路径

来自分类Dev

提示名称在macOS终端中来自何处?

来自分类Dev

sudo命令中没有密码提示

来自分类Dev

在提示符中换行命令

来自分类Dev

命令提示符中的字符“ <”

来自分类Dev

命令提示中的SML / NJ错误

来自分类Dev

命令提示符中的json

来自分类Dev

命令提示符中的命令别名?

来自分类Dev

在打开的命令提示符中插入命令

来自分类Dev

命令提示符中的Del命令

来自分类Dev

在macOS中找不到mysql命令

来自分类Dev

MacOS 中提示/PS1 中的 Anaconda 环境?

来自分类Dev

ZShell中的16种颜色

来自分类Dev

普通 Powershell 提示中的工作命令在 PSSession 中拒绝访问

来自分类Dev

mongo命令提示符中的Mongodb聚合

来自分类Dev

从Windows命令提示符中删除代理设置

来自分类Dev

PostgreSQL中不同的命令行提示符的含义?

来自分类Dev

如何使用ant在新提示中执行命令

来自分类Dev

系统变量路径在命令提示符中不同

来自分类Dev

Haskell中的GHCI vs Prelude命令提示符

来自分类Dev

在shell中执行命令之前总是提示用户

来自分类Dev

在提示而不是脚本中运行的命令行

来自分类Dev

在shell中执行命令之前总是提示用户

来自分类Dev

在每次提示之前在当前外壳中执行命令

来自分类Dev

如何设置bash提示符中输入的命令的样式?

来自分类Dev

我的Vista命令提示符中始终“插入”

来自分类Dev

在Windows中重新启动命令提示符