2016-11-18 11 views
0

私はちょうど私のMacをインストールし、iTermと魚のシェルを設定します。私はああ私の魚をインストールしました。しかし、何とかこの未知のキャラクターが私の端末についてきました。どのように私はそれを削除します。私は魚とitermと運を再インストールしようとしました。 fishk_prompt出力を要求されるように:端末のガベージ文字を取得する

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 
+0

'type fish_prompt'の出力を表示します。 –

+0

が追加されました。探してくれてありがとう。 –

答えて

4

あなたは "[I]" という意味ならば、それはVI-モード表示の更新された

enter image description here

。あなたはvi-bindingsを使用していますが、あなたがどのモードにいるのかわからない場合は混乱する可能性があるので、これはデフォルトで有効になっています。無効にする場合は、

function fish_mode_prompt; end 

を設定に追加してください。

+0

ありがとうありがとう –

+1

@ fahoの答えを追加すると、わかりやすい理由から、oh-my-fishとfishermanを介して利用できる多くのプラグインテーマがいくつかの不可解な理由でviキーバインディングを有効にしていることがわかりました。インストールするすべてのプラグインを確認する必要があります。もちろん、あなたの〜/ .config/fish/config.fishに 'fish_vi_mode'や' fish_vi_key_bindings'を追加して忘れてしまった可能性もあります。その場合は、その行を削除してください。 –

関連する問題