Comments (3)
Thanks for the report. The problem doesn't reproduce in my environment. It is likely to be some compatibility issue with other settings in your ~/.bashrc or some Bash configurations provided by the system.
For example, this problem will happen when the prompt is not shown through the result of evaluating PS1
but directly through outputting something to TTY from the commands in PS1 or PROMPT_COMMAND. (If that is the case, it would cause issues even without ble.sh)
- Q1: What are the outputs of the following commands?
$ declare -p PS1 PROMPT_COMMAND | cat -v
- Q2: Does the problem reproduce when you comment out all the other configurations in your
~/.bashrc
? (Be careful to back up your~/.bash_history
if you increase the history size from the Bash default, 500.).- If the problem doesn't arise after commenting out the others, could you identify which setting causes the interference?
- If the problem still persists, could you also check the behavior when you start the child Bash session with the reduced .bashrc? The child Bash session can be started by running another Bash process by the command
bash
inside a Bash interactive session.
I used the bug report template to draft this issue. Sorry if this is not a "bug report".
Don't worry. This is actually the template for the general problems which covers bugs, compatibility issues, or wrong user configurations. It is usually hard to determine at the beginning whether it is a bug or any other type of issue.
from ble.sh.
Thank you for your reply. Here are my answers:
Q1: What are the outputs of the following commands?
$ declare -p PS1 PROMPT_COMMAND | cat -v
declare -- PS1="\\[\\e]0;\\u@\\h: \\w\\a\\]\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\\$ "
declare -a PROMPT_COMMAND=([0]="_opam_env_hook;printf \"\\033]0;%s@%s:%s\\007\" \"\${USER}\" \"\${HOSTNAME%%.*}\" \"\${PWD/#\$HOME/\\~}\"")
In addition, here are the .bashrc
codes declaring my PS1
. It is based on the Ubuntu version, but I've removed the Ubuntu-specific codes (i.e. debian-chroot
) to optimize it on Arch Linux.
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
Q2: Does the problem reproduce when you comment out all the other configurations in your ~/.bashrc?
I've commented out all scripts except the blesh ones, it still happens.
Here are my .bashrc
and related scripts: https://gist.github.com/Emojigit/27d420b7de1ef7a940061e79aa7f655e
from ble.sh.
Thank you for providing your additional context, and sorry for the delayed reply. I'm recently busy, so it might further delay.
from ble.sh.
Related Issues (20)
- Unable to set ble-face `syntax_function_name` HOT 7
- Source ble.sh each time when restart a console will increase the time cost. HOT 15
- expanding abbreviations that are the results of completions HOT 1
- [SUSE /etc/inputrc] issues sourcing ble.sh HOT 16
- [WSL] ble.sh breaks on start and does not let me type in the console HOT 40
- Several questions about ble.sh usage HOT 8
- Exit status 1 when using pipe and grep HOT 6
- [Alacritty v0.7.0-0.13.1] Newlines inserted when scrolling up HOT 16
- Sabbrev expansions not working HOT 8
- Disable option completion HOT 4
- [WINCH in ble/prompt/update] Cyclic dependency error HOT 13
- Moving down through history gets stuck in multiline HOT 2
- Cannot bind RET in nsearch mode HOT 3
- Kitty's terminal protocol & complete_menu_complete_opts HOT 7
- Incorrect behaviour with C-w HOT 4
- Always one frame (16.7ms) delay between pressing enter and running command HOT 10
- C-RET never works HOT 6
- ln=target in LS_COLORS breaks ble.sh autocomplete highlight HOT 3
- [zellij 0.40.1] Zellij HOT 2
- [tealdeer 1.61] the tldr completion produces errors and a few questions HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ble.sh.