Jump to content

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


mccamel

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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

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