- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
如你所见,当我写一个很长的命令行时,zsh提示符消失了,我也不知道为什么
.zshrc
:
autoload -U compinit promptinit
compinit
promptinit
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BDésolé, pas de résultats pour : %d%b'
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
function powerline_precmd() {
PS1="$(~/powerline-shell.py $? --shell zsh 2> /dev/null)"
}
function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}
if [ "$TERM" != "linux" ]; then
install_powerline_precmd
fi
bindkey ';5D' emacs-backward-word
bindkey ';5C' emacs-forward-word
我使用 Xfce4-terminal,我在 Debian stretch 上
谢谢
最佳答案
这是由于 zsh 如何决定提示的长度。通常使用标准命令它自己可以正常工作,但是,运行 python 脚本并将其回显到提示符会混淆它,我无法正确修复它,添加 %27{
之前和 %}
之后 $(~/powerline-shell.py $? --shell zsh 2>/dev/null)
使它看起来适用于我,但这只是根据我的电力线提示临时解决的问题。
一个更可行的解决方法是转储 powerline-shell 并乱用 bash-powerline完全使用 bash 命令编写,与 zsh 交叉兼容。
关于linux - zsh + 电力线 : prompt disappears with long command line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35881930/
我正在学习使用 PowerShell 编写脚本,我发现这段代码可以帮助我完成一个项目 该示例来自 Is there a one-liner for using default values with
出于好奇,window.prompt 和 JavaScript 中的 prompt 之间有什么区别。 老师用的我考试题的答案之一 var yourName = window.prompt("Pleas
我正在使用 Phonegap 构建一个应用程序我正在使用 javascript 提示输入类别名称,效果很好 var newcat=prompt("ADD CATEGORY",""); 我想将其
我正在使用 Anaconda 学习 Python。早些时候我只有 Anaconda Prompt。但是最近通过 更新了 Anaconda 之后 conda update conda 我是来看Anaco
我有一个对话框,其中有多个提示(Prompts.text, Prompts.number, Prompts.Choice,提示.确认)。虽然 Prompts.choice 和 Prompts.conf
我有一个引用参数“Year_Parameter”的值提示,以及一个包含一列(数据项表达式)的列表,该列表以这种方式引用与值提示相同的参数: #prompt('Year_Parameter')# 值提示
我正在尝试从绘制 ZSH shell 提示的函数中将当前光标位置(当前行号和列)读入一个变量中。我的目标是在提示下方显示内容,仅当有足够多的空行不会导致额外滚动时。 在交互式 shell 中,我可以使
有什么(支持的)方法可以做到这一点吗? IIRC 当使用“比 X 更暗”的色调颜色时,它通常会在某个时刻自行切换为白色,但我们的方案似乎处于边缘。 最佳答案 在 iOS5 中可以实现: [[UINav
如果生成的列表对于打开的命令提示符窗口的高度来说太长(就像这个长分支列表),它就会卡在这里。它首先显示适合窗口的内容,然后显示 :,如果按 ↓,您将到达列表的末尾,并显示 (END) 如何摆脱这种情况
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
例如,我想删除 AppData/Roaming/MyFolder/myfile.txt 中的文件。 我使用命令提示符并输入:del %userprofile%/AppData/Roaming/MyFo
例如,我想删除 AppData/Roaming/MyFolder/myfile.txt 中的文件。 我使用命令提示符并输入:del %userprofile%/AppData/Roaming/MyFo
这个问题已经有答案了: Is there a destructor for Java? (24 个回答) 已关闭 8 年前。 我正在将一些 C++ 代码移植到 Java,这些代码使用非常常见的 C++
在android中我定义了一个布局如下: ... 但由于某些原因,当我启动相应的 Activity 时,微调器的 android:promp 文本未显示。为了完整起见
代码是这样的: for(var node=iterator.iterateNext(),origin_background=node.style.background;node;node=iterat
仅当用户在提示中单击取消 时,下面的代码才会运行alert('Please enter your name!');。如果用户未在提示框中输入任何内容并单击 Enter,我试图让代码也运行所述警报。但是
我想知道是否可以根据当前路径或pwd值更改PS1? 例如: cd /home/user/directory1 PS1=[\e[1;32m\u\e[m@\e[1;34m\h\e[m \e[1;33m\W
这是一个奇怪的问题,我无法通过 Google 找到好的答案(当然,我总是有可能会失败)。在我的 bash 提示符下,如果我给提示符的一部分涂上颜色,当我按“向上”键转到上一个命令时,在超过一定数量的字
有没有办法验证javascript中调用window.prompt()显示的提示框的输入textBox的文本? 我的意思是,如果输入文本框中写入的字符串包含数字或我定义的其他非法字符等,则在单击“确定
我正在努力使用 HTML 代码来验证外部 js 文件中 Javascript Prompt() 的输入。我了解调用 Javascript 函数进行验证,并且知道如何编写该函数,但是如何“监听”HTML
我是一名优秀的程序员,十分优秀!