Jump to content
Sign in to follow this  
mccamel

Add /usr/bin/zsh to "Language" options for workflows

Recommended Posts

I use zsh as my primary shell and have added a few crucial directories to $PATH in my ~/.zshenv:

 

- $HOME/.rvm/bin   (allows use of rvm ruby)

- /usr/local/bin    (Homebrew binaries)

- /usr/local/mysql/bin     (mysql executable)

- a personal scripts directory

 

This prevents me from needing to specify absolute paths in many of my scripts.  As far as I know, bash lacks a file that is automatically sourced for scripts (non-interactive shells); instead you need to set the BASH_ENV environment variable to point to such a file.  I'd like to avoid setting this in all of my Alfred bash scripts, so typically I just run `zsh -c "PATHTOMYSCRIPT ARGS"` for Alfred workflows.  This is just a hoop I have to jump through though, and it would be nice if /usr/bin/zsh were added directly to the language list.

Share this post


Link to post
Share on other sites

This is something that is not likely to happen as Andrew usually tries to keep items like this to a minimal set that are included on everyones system. Zsh is something that is installed by the end user and shouldn't be presented as an option to everyone to prevent confusion.

Share this post


Link to post
Share on other sites

This is something that is not likely to happen as Andrew usually tries to keep items like this to a minimal set that are included on everyones system. Zsh is something that is installed by the end user and shouldn't be presented as an option to everyone to prevent confusion.

 

zsh is part of the base os/x install. Here's the list of all of the built-in shells: /bin/bash, /bin/csh, /bin/ksh, /bin/sh, /bin/tcsh, /bin/zsh. The list of all "known" shells is in /etc/shells. It would be awesome if any one of them could be used in place of bash.

Share this post


Link to post
Share on other sites

Yeah I was just coming back to correct my post. There may be a possibility of this. Do you know if Zsh is installed by default all the way back to 10.6?

 

It goes back to 10.2. So, yes. :-)

Share this post


Link to post
Share on other sites

Couldn't there also be an option to simply add your own entry to "Languages"?  This would avoid cluttering the list with all of those different shells while allowing anyone who wanted to use one to do so.

Share this post


Link to post
Share on other sites

Also bear in mind customer base, people using Alfred are far more likely than the average  user to have installed custom shells, homebrew and macports etc. Anyway +1, I'm a heavy zsh user. Moar Integration!

Share this post


Link to post
Share on other sites

Also bear in mind customer base, people using Alfred are far more likely than the average  user to have installed custom shells, homebrew and macports etc. Anyway +1, I'm a heavy zsh user. Moar Integration!

 

There is nothing to support this statement. People making workflows may be more likely to have additional stuff installed but that's about it. I don't use additional shells, homebrew, or macports.

Share this post


Link to post
Share on other sites

There is a good chance I'll add zsh at some point to the default script languages, but if I do, it won't be run in interactive mode as this is likely to break the workflow when sharing.

 

I also prefer bootstrapping from any language across to my actual workflow (much like David does in many of his workflows), as this allows you to use your own development environment.

Share this post


Link to post
Share on other sites

Join the conversation

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

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

Sign in to follow this  

×
×
  • Create New...