bash - ununtu bash session exiting on using tab key or some error commands
问题描述
Team, I am unable to catch this that only on first time when i issue a TAB key for command completion or any command that results in stderr, my bash session exits. When i login again and do the same exact it does not. Then after like some time, i start to the same exit behavour. Not sure what is wrong. In my ~/bashrc I have follwing info.
My scenario is I ssh from my macbook to a linux ubuntu and then i execute commands.
cat ~/.bashrc | grep PS
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
export PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\]$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] '
cat ~/.bashrc | grep set
# set a fancy prompt (non-color, unless we know we "want" color)
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# a case would tend to support setf rather than setaf.)
unset color_prompt force_color_prompt
env | grep set
_VIRTUALENVWRAPPER_API= mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv
env | grep PS
PS1=\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\]$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\]
解决方案
推荐阅读
- javascript - 一个应该每秒重复的功能正在立即发生
- video - Twitter 分享:如何在视频中显示链接 [内有示例]
- objective-c - SpriteKit SKAction moveTo:当应用程序进入后台时失真
- javascript - 随机播放对象数组,而无需多次选择相同的项目
- python - TensorFlow v2 替代 sequence_loss_by_example
- modelica - 图形显示与 Dymola 中的文本代码不一致
- python - 输出未出现在 python 2.7 上
- php - 维护和建立安全会话的最佳方法是什么?我目前使用的代码
- rust - Rust if let Optionals 和比较条件
- javascript - Vuetify v-treeview 获取最后点击的节点