Normalisation et nettoyage #4

Open
xavier wants to merge 14 commits from dev into master
5 changed files with 8 additions and 8 deletions
Showing only changes of commit 6968a93343 - Show all commits
+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
next
}
{print}' "$FILE"
{print}' "${FILE}"
}
+2 -2
View 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
}
+2 -2
View File
@@ -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
}
+2 -2
View File
@@ -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