Open R4miZ1z opened 10 months ago
Thank you for the report. It seems there are similar reports, but I cannot reproduce the problem in my environment somehow.
echo "$BASH_VERSION"
. (Note that bash --version
is unreliable because it can pick up another version of Bash, which is different from the one of the current session.)diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index b50f829..991aaf0 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,7 +63,7 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}${_omb_prompt_bold_brown}\u${_omb_prompt_normal}${icon_host}${_omb_prompt_bold_teal}\h${_omb_prompt_normal}${icon_directory}${_omb_prompt_bold_purple}\W${_omb_prompt_norma>
+ PS1="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
PS2="${icon_end}"
}
diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index 991aaf0..24c6e8e 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,7 +63,7 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
+ PS1="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on \")"
PS2="${icon_end}"
}
diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index 24c6e8e..a470580 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,7 +63,7 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on \")"
+ PS1='$([[ -n $(echo x) ]] && echo "")'
PS2="${icon_end}"
}
Bash version --> 5.2.12(1)-release
OS Info: Edition Windows 11 Home Version 22H2 Installed on 30/09/2022 OS build 22621.2134 Experience Windows Feature Experience Pack 1000.22659.1000.0
The following is being shown:
The following is being shown:
The following is being shown:
Hope this helps
Thank you for your reply, and sorry for the blank. For Q3..Q5, I wanted to know the status of the error message you reported, but not really the appearance of the prompt. Did you imply that error messages went away with the setups of Q3..Q5?
Hello, sorry for the extremely late reply, I ran these tests once again, Q3 and Q4 work as shown in the above pictures from my last reply with no errors shown. Q5 is different from the above picture and is now showing nothing. No errors are being shown on any of them however.
Q5 is different from the above picture and is now showing nothing.
I think in the previous time, you tried something like '\$([[ -n $(echo x) ]] && echo "")'
instead of '$([[ -n $(echo x) ]] && echo "")'
. This small difference affects the whole debugging procedure, so I suggest you to copy and paste the added parts of diffs instead of manually editing for the next questions.
Q3 and Q4 work as shown in the above pictures from my last reply with no errors shown. Q5 is different from the above picture and is now showing nothing. No errors are being shown on any of them however.
Thank you! That means that the settings in Q3..Q5 are working in expected ways. The problem is related to something removed in Q3, i.e., \n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}${_omb_prompt_bold_brown}\u${_omb_prompt_normal}${icon_host}${_omb_prompt_bold_teal}\h${_omb_prompt_normal}${icon_directory}${_omb_prompt_bold_purple}\W${_omb_prompt_normal}
. We may bisect this part. Could you try the similar for the following Q6..Q8?
diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index b50f829..23e2497 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,7 +63,8 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}${_omb_prompt_bold_brown}\u${_omb_prompt_normal}${icon_host}${_omb_prompt_bold_teal}\h${_omb_prompt_normal}${icon_directory}${_omb_prompt_bold_purple}\W${_omb_prompt_norma>
+ PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}\u${icon_host}\h${icon_directory}\W"
+ PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")$(scm_prompt_info)\n${icon_end}"
PS2="${icon_end}"
}
diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index 23e2497..9358475 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,8 +63,8 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\n${icon_start}$(_omb_prompt_print_python_venv)${icon_user}\u${icon_host}\h${icon_directory}\W"
- PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")$(scm_prompt_info)\n${icon_end}"
+ PS1="\n$(_omb_prompt_print_python_venv)\u\h\W"
+ PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")$(scm_prompt_info)"
PS2="${icon_end}"
}
diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh
index 9358475..d70b43b 100644
--- a/themes/cupcake/cupcake.theme.sh
+++ b/themes/cupcake/cupcake.theme.sh
@@ -63,8 +63,8 @@ function winname {
# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
- PS1="\n$(_omb_prompt_print_python_venv)\u\h\W"
- PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")$(scm_prompt_info)"
+ PS1="\n\u\h\W"
+ PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
PS2="${icon_end}"
}
Q6 resulted in the following errors, these match the errors that I initially received at the start of this issue request.
Q7 resulted in no errors with the branch icon being shown correctly and everything.
Q8 once again resulted in no errors and showed the branch icon without the branch name ofc.
Thank you! So it seems to be related to emoji characters.
PS1="${icon_start}${icon_user}${icon_host}${icon_directory}\W"
PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
PS1="${icon_start}${icon_user}${icon_host}${icon_directory}"
PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
PS1="${icon_host}${icon_directory}"
PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
PS1="${icon_directory}"
PS1+="\$([[ -n \$(command git branch 2> /dev/null) ]] && echo \" on ${icon_branch} \")"
I am getting these errors when using the 'cupcake' theme. I have changed the .sh file for this theme and tried to change the branch icon to a number of things without a change in error, I have also uninstalled and reinstalled oh-my-bash to no avail. Any idea why I may be getting these errors? I am not very big on technical knowledge but will try my best to assist with any requests.