Skip to content

v20230120

Latest
Compare
Choose a tag to compare
@brunerd brunerd released this 20 Jan 17:12
· 3 commits to main since this release
62806a5

shui adds Applescript user interaction to your shell script

Changelog

v20230120

  • Temporary icon files are always used, now that macOS Ventura displays a one-time TCC Security & Privacy notification when an icon within a user installed app bundle is used. Applescript updates the access time of the icon file and causes the alert: "<shell>" was prevented from modifying apps on your Mac"
  • Added sub functions within shui for code reuse when processing text for use in AppleScript
  • Rebuild of shui.min.sh

v20221117

  • Now prevents alteration of global IFS when function embedded in a script
  • Removed strange appearance of ZWNJ (zero width non-joiner) characters in shui.min
  • v20221117 pkg prior to Dec 30, 2022 contained shui.sh script incorrectly encoded as MacOS Roman which caused sed errors with demos containing Unicode

v20220704

  • xtrace (aka set -x) is disabled while inside the shui function for easier debugging of your script
  • Cleanup of test shell syntax from chained -a and -o style syntax to independent && and || expressions

v20210622

  • Various bug fixes, -t "title" works in list UI type now

v20210326

  • Introduces $lastPID global variable for the PID of a non-blocking (-n) alert or button
  • -X now kills osascript and System Events PIDs
  • -x now kills only osascript PIDs that are children of the script shui is embedded in
  • Various bug fixes. shui runs on macOS 10.9+ (including macOS 11 Big Sur)

v20210322

Continued refinements to -v output: All whitespace characters are now escaped (\b \f \n \r \t \v) for all variables.
Lists now generate an error (-128) like all the others when Cancel is clicked
Improved lastCancel behavior with URL UIType selected nothing

Notes

The macOS Installer package (.pkg) is included for easier installation as a standalone script to use as a quick tester or for calling from scripts without embedding (although you must use -v and eval the output, it might be better to embed). The pkg is not notarized. After downloading you can right-click and choose Open to allow installation or clear the extended attributes with: xattr -c <drag pkg to Terminal> then double click to install.

shui.sh and shui.min.sh are installed to: /usr/local/shui and a symlink is created in /usr/local/bin/shui
Extensions were added for easier opening and editing

shui runs on macOS 10.9+