Bash-it / Bash-it/bash-it

[Bug]: bash: /tmp/alias_completion-23769qilp1o: line 978: unexpected EOF while looking for matching `''

Open
#2,254 11 comments 0 reactions 0 assignees View on GitHub
bug:general help wanted
Dominant language
Shell
Stars
15.2k
Forks
2.3k
Avg merge
7d 1h
Merged PRs (30d)
2

Description

### Expected behavior

source .bashrc doesn't work without errors.

### Current behavior

Currently when I do source .bashrc it gives me the following error,
`bash: /tmp/alias_completion-23769qilp1o: line 978: unexpected EOF while looking for matching `''`

### Possible solution

_No response_

### Context

I have a fresh install plus I have ble.sh plugin turned on and ble.sh installed.

### Steps to reproduce

Install bash-it with --silent flag. Install ble.sh and then enable add-on. Do source .bashrc.

### Bash-it version

d985e4c

### List of enabled plugins, themes and aliases

base, oh-my-posh

### Bash version

5.2.15

### Operating system and version

Debian GNU/Linux 12

### bash-it doctor output

```
# How to get: bash-it doctor
```

### Your ~/.bashrc

```bash
#!/usr/bin/env bash

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac

# Path to the bash it configuration
export BASH_IT="/root/.bash_it"

# Lock and Load a custom theme file.
# Leave empty to disable theming.
# location /.bash_it/themes/
export BASH_IT_THEME='oh-my-posh'

# Some themes can show whether `sudo` has a current token or not.
# Set `$THEME_CHECK_SUDO` to `true` to check every prompt:
#THEME_CHECK_SUDO='true'

# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'

# (Advanced): Change this to the name of the main development branch if
# you renamed it or if it was changed for some reason
# export BASH_IT_DEVELOPMENT_BRANCH='master'

# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com'

# Don't check mail when opening terminal.
unset MAILCHECK

# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'

# Set this to the command you use for todo.txt-cli
export TODO="t"

# Set this to the location of your work or project folders
#BASH_IT_PROJECT_PATHS="${HOME}/Projects:/Volumes/work/src"

# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set to actual location of gitstatus directory if installed
#export SCM_GIT_GITSTATUS_DIR="$HOME/gitstatus"
# per default gitstatus uses 2 times as many threads as CPU cores, you can change this here if you must
#export GITSTATUS_NUM_THREADS=8

# Set Xterm/screen/Tmux title with only a short hostname.
# Uncomment this (or set SHORT_HOSTNAME to something else),
# Will otherwise fall back on $HOSTNAME.
#export SHORT_HOSTNAME=$(hostname -s)

# Set Xterm/screen/Tmux title with only a short username.
# Uncomment this (or set SHORT_USER to something else),
# Will otherwise fall back on $USER.
#export SHORT_USER=${USER:0:8}

# If your theme use command duration, uncomment this to
# enable display of last command duration.
#export BASH_IT_COMMAND_DURATION=true
# You can choose the minimum time in seconds before
# command duration is displayed.
#export COMMAND_DURATION_MIN_SECONDS=1

# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
#export SHORT_TERM_LINE=true

# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt

# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1

# Uncomment this to make Bash-it create alias reload.
# export BASH_IT_RELOAD_LEGACY=1

# Load Bash It
source "$BASH_IT"/bash_it.sh

alias sourceme="source ~/.bashrc"
alias bashconf="nvim ~/.bashrc"
alias nv='nvim'

# Enable fuzzy history search with Ctrl+R
if [[ $- == *i* ]]; then
bind '"\C-r": "$(fzf-history-widget)"'
fi

fzf-history-widget() {
local selected_command
selected_command=$(history | fzf +s --tac --no-sort --preview="echo {} | cut -d' ' -f4-")
READLINE_LINE=${selected_command#* }
READLINE_POINT=${#READLINE_LINE}
}

# Function to change oh-my-posh theme
change_posh_theme() {
if [ -z "$1" ]; then
echo "Usage: change_posh_theme "
return 1
fi
local THEME_URL="https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/$1.omp.json"
if curl --output /dev/null --silent --head --fail "$THEME_URL"; then
sed -i "s#export POSH_THEME=.*#export POSH_THEME=${THEME_URL}#" /root/.bash_it/themes/oh-my-posh/oh-my-posh.theme.bash
source /root/.bash_it/themes/oh-my-posh/oh-my-posh.theme.bash
echo "Theme changed to $1"
else
echo "Theme $1 not found. Please check the theme name and try again."
return 1
fi
}
```

### Notes

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.