aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/lf
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/lf')
-rwxr-xr-xmodules/by-name/lf/lf/commands/base.sh7
1 files changed, 5 insertions, 2 deletions
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