Terminal 在终端中获取垃圾字符
所以我刚刚安装了我的mac电脑,并设置了iTerm和fish shell。我也安装了我的鱼。但不知怎的,这个不知名的角色一直卡在我的终端上。我如何删除它。我试着重新安装fish和iterm,但没有成功 更新: fishk_按要求提示输出:Terminal 在终端中获取垃圾字符,terminal,fish,iterm2,Terminal,Fish,Iterm2,所以我刚刚安装了我的mac电脑,并设置了iTerm和fish shell。我也安装了我的鱼。但不知怎的,这个不知名的角色一直卡在我的终端上。我如何删除它。我试着重新安装fish和iterm,但没有成功 更新: fishk_按要求提示输出: fish_prompt is a function with definition function fish_prompt # Cache exit status set -l last_status $status # Just
fish_prompt is a function with definition
function fish_prompt
# Cache exit status
set -l last_status $status
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt_char
switch (id -u)
case 0
set -g __fish_prompt_char '#'
case '*'
set -g __fish_prompt_char 'λ'
end
end
# Setup colors
#use extended color pallete if available
#if [[ $terminfo[colors] -ge 256 ]]; then
# turquoise="%F{81}"
# orange="%F{166}"
# purple="%F{135}"
# hotpink="%F{161}"
# limegreen="%F{118}"
#else
# turquoise="%F{cyan}"
# orange="%F{yellow}"
# purple="%F{magenta}"
# hotpink="%F{red}"
# limegreen="%F{green}"
#fi
set -l normal (set_color normal)
set -l white (set_color FFFFFF)
set -l turquoise (set_color 5fdfff)
set -l orange (set_color df5f00)
set -l hotpink (set_color df005f)
set -l blue (set_color blue)
set -l limegreen (set_color 87ff00)
set -l purple (set_color af5fff)
# Configure __fish_git_prompt
set -g __fish_git_prompt_char_stateseparator ' '
set -g __fish_git_prompt_color 5fdfff
set -g __fish_git_prompt_color_flags df5f00
set -g __fish_git_prompt_color_prefix white
set -g __fish_git_prompt_color_suffix white
set -g __fish_git_prompt_showdirtystate true
set -g __fish_git_prompt_showuntrackedfiles true
set -g __fish_git_prompt_showstashstate true
set -g __fish_git_prompt_show_informative_status true
# Line 1
echo -n $white'╭─'$hotpink$USER$white' at '$orange$__fish_prompt_hostname$white' in '$limegreen(pwd)$turquoise
__fish_git_prompt " (%s)"
echo
# Line 2
echo -n $white'╰─'$__fish_prompt_char $normal
end
如果你的意思是“[I]”,那就是vi模式指示器。您正在使用vi绑定,如果您不知道自己处于什么模式,那么这些绑定可能会非常混乱,因此默认情况下会启用。如果要禁用它,请添加
function fish_mode_prompt; end
到您的配置。如果您的意思是“[I]”,那就是vi模式指示灯。您正在使用vi绑定,如果您不知道自己处于什么模式,那么这些绑定可能会非常混乱,因此默认情况下会启用。如果要禁用它,请添加
function fish_mode_prompt; end
添加到您的配置。显示添加的
类型fish\u提示符的输出。谢谢查看。显示添加的type fish\u提示符的输出。非常感谢您的关注。非常感谢您对@faho的回答进行补充。我们注意到,出于某些莫名其妙的原因,很多插件主题都可以通过“哦,我的鱼和渔夫”实现vi键绑定。你应该检查你安装的每个插件。当然,也有可能您只是将fish_vi_模式
或fish_vi_键
添加到~/.config/fish/config.fish中,然后忘记了它。在这种情况下,请删除该行。非常感谢您在@faho的回答中添加内容。我们注意到,出于某些无法解释的原因,很多插件主题都可以通过“哦,我的鱼和渔夫”实现vi键绑定。你应该检查你安装的每个插件。当然,也有可能您只是将fish_vi_模式
或fish_vi_键
添加到~/.config/fish/config.fish中,然后忘记了它。在这种情况下,只需删除该行。