Improve shellcheck compatibility

This commit is contained in:
Nathaniel Landau
2021-10-28 17:59:34 -04:00
parent f44ea3d2e6
commit 86300b68c4
15 changed files with 286 additions and 180 deletions

View File

@@ -31,7 +31,8 @@ _guiInput_() {
# https://github.com/herrbischoff/awesome-osx-command-line/blob/master/functions.md
if _haveScriptableFinder_; then
local _guiPrompt="${1:-Password:}"
local _guiInput=$(
local _guiInput
_guiInput=$(
osascript &>/dev/null <<GUI_INPUT_MESSAGE
tell application "System Events"
activate
@@ -39,7 +40,7 @@ _guiInput_() {
end tell
GUI_INPUT_MESSAGE
)
echo -n "${_guiInput}"
printf "%s\n" "${_guiInput}"
else
error "No GUI input without macOS"
return 1