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:
@@ -1 +1 @@
|
||||
grepp() { x=$1; shift; perl -00ne ' print if /'"$x"'/i ' "$*" ; }
|
||||
grepp() { x=$1; shift; perl -00ne ' print if /'"${x}"'/i ' "$*" ; }
|
||||
|
||||
@@ -12,5 +12,5 @@ function ldifparse ()
|
||||
if (length) print
|
||||
next
|
||||
}
|
||||
{print}' "$FILE"
|
||||
{print}' "${FILE}"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
_path_add() {
|
||||
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"$PATH:"}$1"
|
||||
if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"${PATH}:"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
_prompt_command_add() {
|
||||
if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND;"}$1"
|
||||
if [ -n "$1" ] && [[ ":${PROMPT_COMMAND}:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"${PROMPT_COMMAND};"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ vm_create_magick2() {
|
||||
template=${3}
|
||||
|
||||
# Define ressources based on template
|
||||
case $template in
|
||||
case ${template} in
|
||||
small)
|
||||
vcpus="1,maxvcpus=2"
|
||||
memory="1024,maxmemory=2048"
|
||||
@@ -262,7 +262,7 @@ _hypervisors() {
|
||||
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)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user