From c9944e92bc1e2bff9071300b25b11642d218f424 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 28 May 2026 13:10:42 +0200 Subject: treewide: Format --- modules/by-name/lf/lf/commands/base.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/by-name/lf') diff --git a/modules/by-name/lf/lf/commands/base.sh b/modules/by-name/lf/lf/commands/base.sh index 0c2f391a..e0b6216c 100755 --- a/modules/by-name/lf/lf/commands/base.sh +++ b/modules/by-name/lf/lf/commands/base.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # nixos-config - My current NixOS configuration # @@ -41,7 +41,7 @@ prompt() { # set -- "$@" "$file" # done < "$(echo "$fx" | tmp)" tmp() { - __base_tmp_temporary_file="$(mktemp -t --tmpdir="$__base_tmp_temporary_directory" lf_commands_tmp_fun_XXXXXXXX )" + __base_tmp_temporary_file="$(mktemp -t --tmpdir="$__base_tmp_temporary_directory" lf_commands_tmp_fun_XXXXXXXX)" cat >"$__base_tmp_temporary_file" echo "$__base_tmp_temporary_file" } @@ -60,6 +60,9 @@ trap 'rm --recursive "$__base_tmp_temporary_directory"' EXIT lf_cmd() { arguments="" for arg in "$@"; do + # We _can_ use the fancy bash syntax, but it's really hard to correctly quote the + # single quote in bash, and I don't really feel like it's worth it. + # shellcheck disable=SC2001 arg="$(echo "$arg" | sed "s/'/\\\'/g")" if [ -z "$arguments" ]; then -- cgit v1.3.1