Fix lint errors in multiple files (#2192)

* fix (plugins): enable interpretation of backslash escapes in colors
* fix (lint): disable SC2317 in install.sh
* fix (lint): SC2086 in agnoster theme
* fix (lint): remove exit from install.sh as it is already implemented in the calling function
pull/2130/head
Gurkirat Singh 2023-02-22 21:49:12 +05:30 committed by GitHub
parent feb468b517
commit 78f88406cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,6 @@ function _bash-it_show_usage() {
echo "--no-modify-config (-n): Do not modify existing config file"
echo "--append-to-config (-a): Keep existing config file and append bash-it templates at the end"
echo "--overwrite-backup (-f): Overwrite existing backup"
exit 0
}
# enable a thing

View File

@ -8,13 +8,13 @@ function __() {
function __make_ansi() {
next=$1
shift
echo "\[\e[$("__$next" "$@")m\]"
echo -e "\[\e[$("__$next" "$@")m\]"
}
function __make_echo() {
next=$1
shift
echo "\033[$("__$next" "$@")m"
echo -e "\033[$("__$next" "$@")m"
}
function __reset() {

View File

@ -182,7 +182,7 @@ prompt_segment() {
# declare -p codes
if [[ $CURRENT_BG != NONE && $1 != "$CURRENT_BG" ]]; then
declare -a intermediate=("$(fg_color $CURRENT_BG)" "$(bg_color "$1")")
declare -a intermediate=("$(fg_color "$CURRENT_BG")" "$(bg_color "$1")")
debug "pre prompt " "$(ansi intermediate[@])"
PR="$PR $(ansi intermediate[@])$SEGMENT_SEPARATOR"
debug "post prompt " "$(ansi codes[@])"