Commit 730a8b02 authored by Dylan Araps's avatar Dylan Araps

Fix quote syntax errors

parent 6b0a9ebf
...@@ -170,9 +170,9 @@ getdistro() { ...@@ -170,9 +170,9 @@ getdistro() {
done done
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro="${NAME:-"${DISTRIB_ID}"} ${VERSION_ID:-"${DISTRIB_RELEASE}"}" ;; "on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
"tiny") distro="${NAME:-"${DISTRIB_ID:-"${TAILS_PRODUCT_NAME}"}"}" ;; "tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
"off") distro="${PRETTY_NAME:-"${DISTRIB_DESCRIPTION}"} ${UBUNTU_CODENAME}" ;; "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
esac esac
# Workarounds for distros that go against the os-release standard. # Workarounds for distros that go against the os-release standard.
...@@ -1541,12 +1541,13 @@ gettermfont() { ...@@ -1541,12 +1541,13 @@ gettermfont() {
case "$term" in case "$term" in
"urxvt" | "urxvtd" | "xterm") "urxvt" | "urxvtd" | "xterm")
termfont="$(grep -i -F "${term/d}*font" <<< "$(xrdb -query)")" termfont="$(grep -i -F "${term/d}*font" <<< "$(xrdb -query)")"
termfont="${termfont/*font: }" termfont="${termfont/*font:}"
termfont="$(trim "$termfont")"
# Xresources has two different font syntax, this checks which # Xresources has two different font syntax, this checks which
# one is in use and formats it accordingly. # one is in use and formats it accordingly.
case "$termfont" in case "$termfont" in
"xft:"*) *"xft:"*)
termfont="${termfont/xft:}" termfont="${termfont/xft:}"
termfont="${termfont/:*}" termfont="${termfont/:*}"
;; ;;
...@@ -2353,7 +2354,7 @@ info() { ...@@ -2353,7 +2354,7 @@ info() {
# Call the function and update variable # Call the function and update variable
"get${2:-$1}" 2>/dev/null "get${2:-$1}" 2>/dev/null
eval output="\$${2:-"$1"}" eval output="\$${2:-$1}"
# Trim whitespace # Trim whitespace
output="$(trim "$output")" output="$(trim "$output")"
...@@ -2405,7 +2406,7 @@ info() { ...@@ -2405,7 +2406,7 @@ info() {
# Prin {{{ # Prin {{{
prin() { prin() {
string="${1//$'\033[0m'}${2:+: "$2"}" string="${1//$'\033[0m'}${2:+: $2}"
# If $2 doesn't exist we format $1 as info # If $2 doesn't exist we format $1 as info
[ -z "$2" ] && local subtitle_color="$info_color" [ -z "$2" ] && local subtitle_color="$info_color"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment