Jump to content

[SOLVED] Open Alfred's File Action Panel FROM Bash?

Recommended Posts

Hi, I use ranger as my filemanager - ranger is a bash-filemanager, so interacting with Alfreds File-Selection Shortcut (Settings->Features->File Search->Actions->File Selection) does not work. Thats not a problem because I can call any script with selected files in ranger. It would be nice to open Alfreds Action Panel from bash in order to use Alfred to act on selected files. Is there a way to do that?

Example (from bash):


# "/Applications/Alfred\ 3.app/Contents/MacOS/Alfred\ 3" /path/to/my/selected/file1 /path/to/my/selected/file2 ...


Thanks a lot! 

Share this post

Link to post

You can do it via Alfred’s AppleScript API. I’m on my phone atm, but the command is something like:


osascript -e “tell application \“Alfred 3\” to action \”$1\””


where $1 is the filepath.

Share this post

Link to post

@zpete, I thought it could be great to point you to a related script I did for that (and more) so this can give you some more ideas...


Just have a look at this script and discussion: 


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...