Jump to content

[SOLVED] Running a one-line zsh command in Alfred

Recommended Posts

I am trying to create a workflow that would display a random line from a .txt file.


In other other words, use the shuf command to pick a line and display it with a "Large type" object. 


My problem is I can't find a way to run the command "shuf -n 1 ~/Downloads/NameOfMyFile.txt".


I tried to use a "Run script object" wit no luck.


Here is the link to the workflow https://www.dropbox.com/s/0io9515ijeepixt/00_One_Line_Picker.alfredworkflow?dl=0


Thank you.

Share this post

Link to post

@AndrewThanks for your fast answer !


This is what my script looks like.


shuf -n 1 ~/Downloads/One_Liner_Harvey.txt


And it still doesn't work.


I just do not understand how to use this object.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...