From 87c53a18bafc1bdbd6ca05b91a4f9dd6e6131340 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 13 Nov 2024 13:14:58 +0100 Subject: [PATCH] lint --- bash/bash/prompt.sh | 9 +++++---- bash/fs.sh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) 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}"