style: Normalize variable expansions in libs.deprecated/*

These files stay deprecated and out of the sourcing path for now, but
apply the same ${var} notation cleanup as the rest of the repo where
it's a pure notation fix. basedir.bash is left untouched: its bug is
a broken escape, not a notation issue, and it mirrors the one already
removed from _helpers.bash.
This commit is contained in:
2026-08-22 00:55:59 +02:00
parent 6738296ace
commit 6968a93343
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
grepp() { x=$1; shift; perl -00ne ' print if /'"$x"'/i ' "$*" ; } grepp() { x=$1; shift; perl -00ne ' print if /'"${x}"'/i ' "$*" ; }
+1 -1
View File
@@ -12,5 +12,5 @@ function ldifparse ()
if (length) print if (length) print
next next
} }
{print}' "$FILE" {print}' "${FILE}"
} }
+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
_path_add() { _path_add() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
PATH="${PATH:+"$PATH:"}$1" PATH="${PATH:+"${PATH}:"}$1"
fi fi
} }
+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
_prompt_command_add() { _prompt_command_add() {
if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then if [ -n "$1" ] && [[ ":${PROMPT_COMMAND}:" != *":$1:"* ]]; then
PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND;"}$1" PROMPT_COMMAND="${PROMPT_COMMAND:+"${PROMPT_COMMAND};"}$1"
fi fi
} }
+2 -2
View File
@@ -188,7 +188,7 @@ vm_create_magick2() {
template=${3} template=${3}
# Define ressources based on template # Define ressources based on template
case $template in case ${template} in
small) small)
vcpus="1,maxvcpus=2" vcpus="1,maxvcpus=2"
memory="1024,maxmemory=2048" memory="1024,maxmemory=2048"
@@ -262,7 +262,7 @@ _hypervisors() {
if [ -e ~/.ssh/known_hosts ]; then if [ -e ~/.ssh/known_hosts ]; then
known_hypervisors=$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e 's/,.*//g' | grep -v "\[" | grep -i hypervisor | uniq) known_hypervisors=$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e 's/,.*//g' | grep -v "\[" | grep -i hypervisor | uniq)
fi fi
echo $configured_hypervisors $known_hypervisors echo "${configured_hypervisors}" "${known_hypervisors}"
} }
#complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i" | grep -i hypervisor)" hypervisor_connect #complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i" | grep -i hypervisor)" hypervisor_connect