Jump to content

[Snippet Trigger] Question to configure scripts using language /bin/zsh


Recommended Posts

hello Alfred team,

 

Greetings!

 

I was able to use dynamic placeholder e.g. current date and time according to this guidance https://www.alfredapp.com/help/workflows/advanced/placeholders/#arithmetic

 

But it broke since Apple removed PHP and Python 2 from the built-in scripting languages in macOS Monterey, plus I could't reinstall python 2 via Homebrew tons of time so Vero kindly gave me an updated snippet triggers v1.1 using '/bin/zsh' to replace the invalid '/usr/bin/php'

 

My question is how can I modify the complicated script under language "bin/zsh" to make it auto paste e.g. current time to my clipboard?

Cuz previously when php was still working on Big Sur I can simply put a {time:short} to make it happened.

 

Details plz refer to the attachments, would be appreciated if you can give me any idea cuz I'm not a tech-geek it's hard to understand the coding thing I just want to make it possible to have current time/date using {time} & {date} as before.

 

Appreciated in advance : )

 

 

img_0.png

 

 

img_1.png

img_2.png

Edited by donald_d
Link to comment
10 hours ago, donald_d said:

But it broke since Apple removed PHP and Python 2 from the built-in scripting languages in macOS Monterey, plus I could't reinstall python 2 via Homebrew tons of time

 

Python 2 isn’t relevant to that script. Just reinstalling PHP is enough.

 

10 hours ago, donald_d said:

My question is how can I modify the complicated script under language "bin/zsh" to make it auto paste e.g. current time to my clipboard?

Cuz previously when php was still working on Big Sur I can simply put a {time:short} to make it happened.

 

If you just want to paste {time:short} to the frontmost app, why not use a Copy to Clipboard Output directly? The documentation shows it in the screenshot.

 

copy-to-clipboard-example.png

Link to comment

thanks Vitor : )

 

as for “Python 2 isn’t relevant to that script. Just reinstalling PHP is enough.”

 

@vitor

May I know the steps /links to reinstall PHP? I've only got the link to reinstalled Python 2 but it's not related to my case

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...