tizen.moe

tizen.moe

GNU screenの設定をいじくったら長いコマンドの際に1行に上書きされるようになってイライラした話

デフォルト状態。綺麗な私。
f:id:moguriso:20130504132547p:plain


長ったらしいコマンドをガリガリ入れた状態。パッツンパッツン。
f:id:moguriso:20130504132606p:plain

とうとう溢れた。改行されればまだ我慢出来るものを上書きされてウザい。
f:id:moguriso:20130504132723p:plain

どうも、先日いじったPS1の影響らしい。削除されると解消される。

 57 if [ "$color_prompt" = yes ]; then
 58     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
 59 else
 60     PS1='${debian_chroot:+($debian_chroot)}\033k\033\\\u@\h:\w\$ '
 61 fi

上記のL60にある"\033k\033\\"が悪さしているとのこと。

.bashrc で PS1 を設定すると履歴表示がずれる件 - miauの避難所

を参考に

 57 if [ "$color_prompt" = yes ]; then
 58     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
 59 else
 60     PS1='${debian_chroot:+($debian_chroot)}\[\033k\033\\\]\u@\h:\w\$ '
 61 fi

として\[〜\]で括ると解消されました。素晴らしい。いおんくれじっとかーど