From 5f2faae562226eccc760fae9a608c55eaefe63ae Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 28 Jul 2021 11:03:52 +0200 Subject: [PATCH] use bash instead of php --- info.plist | 64 ++++++++++++++++++++++++++++------------------- listShortcuts.php | 12 --------- 2 files changed, 38 insertions(+), 38 deletions(-) delete mode 100755 listShortcuts.php diff --git a/info.plist b/info.plist index f8147fb..7dfe025 100644 --- a/info.plist +++ b/info.plist @@ -32,6 +32,29 @@ macOS Shortcuts objects + + config + + concurrently + + escaping + 102 + script + shortcuts run "$1" + scriptargtype + 1 + scriptfile + + type + 5 + + type + alfred.workflow.action.script + uid + 89622087-1E5E-418B-B4C3-24565FCD0936 + version + 2 + config @@ -60,7 +83,19 @@ runningsubtext script - /usr/local/bin/php ./listShortcuts.php + printf "<?xml version=\"1.0\" encoding=\"UTF-8\"?><items>" +IFS='' +shortcuts list | +while read shortcut +do + printf "<item uid=\"%s\" valid=\"YES\" autocomplete=\"%s\">" $shortcut $shortcut + printf "<title>%s</title>" $shortcut + printf "<subtitle>%s</subtitle>" $shortcut + printf "<icon>sc-icon.png</icon>" + printf "<arg>%s</arg>" $shortcut + printf "</item>" +done +echo "</items>" scriptargtype 1 scriptfile @@ -70,7 +105,7 @@ title Shortcuts type - 0 + 5 withspace @@ -81,29 +116,6 @@ version 3 - - config - - concurrently - - escaping - 102 - script - shortcuts run "$1" - scriptargtype - 1 - scriptfile - - type - 5 - - type - alfred.workflow.action.script - uid - 89622087-1E5E-418B-B4C3-24565FCD0936 - version - 2 - readme @@ -127,7 +139,7 @@ variablesdontexport version - 0.1 + 0.2 webaddress diff --git a/listShortcuts.php b/listShortcuts.php deleted file mode 100755 index a27aee5..0000000 --- a/listShortcuts.php +++ /dev/null @@ -1,12 +0,0 @@ -"; -exec('shortcuts list', $data); -foreach ($data as $shortcut) { - echo ""; - echo "{$shortcut}"; - echo "{$shortcut}"; - echo "sc-icon.png"; - echo "{$shortcut}"; - echo ""; -} -echo "";