diff --git a/bash/bash/prompt.sh b/bash/bash/prompt.sh index 73ef1ff..5ba1159 100644 --- a/bash/bash/prompt.sh +++ b/bash/bash/prompt.sh @@ -1,12 +1,13 @@ ps1() { - local code=${1} - local date="$(date +%H:%M:%S)" + local date host + local code="${1}" + date="$(date +%H:%M:%S)" local git - local host="$(hostname)" + host="$(hostname)" local path="${PWD}" local user="${USER}" local view="└ " - if [ ${code} -ne 0 ]; then + if [ "${code}" -ne 0 ]; then view="${view}\e[0;31m" else view="${view}\e[0;32m" diff --git a/bash/fs.sh b/bash/fs.sh index 5b53b9a..05ac088 100644 --- a/bash/fs.sh +++ b/bash/fs.sh @@ -23,7 +23,7 @@ fs_make_btrfs_swap() { local size="${2}" local uuid="${3}" if [ -n "${path}" ]; then - set filesystem mkswapfile + set -- filesystem mkswapfile if [ -n "${size}" ]; then set -- "${@}" \ --size "${size}"