Rewrite theme() and lstheme() to remove pwd and variable side effects and make behavior consistent.
Include custom themes in lstheme() output.
Add comments that lay down the function interface.
Look for custom themes in $ZSH_CUSTOM/themes as well as base $ZSH_CUSTOM.
Rewrite theme's random theme selection in terms of lstheme() so random themes are included, and to streamline code.
Add a failure indication to theme() with nonzero return status. When a bad theme name is requested, indicate so by issuing a warning and returning nonzero.
LANG is a colon-separated list of prefered locales; LC_CTYPE is single entry,
therefore we need to remove all but one entry.
Also, there is no need setting it if it is already set (LC_ALL also sets
LC_CTYPE, so we check it too).
Ubuntu and Debian store the system-installed virtualenvwrapper in
/etc/bash_completion.d/virtualenvwrapper, so that it gets automatically sourced
at startup in Bash. By not putting it somewhere in $PATH, they end up excluding
others (e.g. Zsh) that might want to use that file. Oops!
The virtualenvwrapper plugin should account for this so that Ubuntu (or Debian)
users don't end up with this message:
zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh. Please install with `pip install virtualenvwrapper`.
even when they have a virtualenvwrapper installed to a known location.
Move the DISABLE_AUTO_TITLE check from title() to the preX hook
functions that call it, to allow the title() function to be used
directly by user or other callers.
This is because we can't be sure which arguments require a json file
and which don't, so the `else' statement will always be difficult to
check for correctness.
Use $_comp_command1 for command list generation instead of 'composer':
`$_comp_command1` contains the command written in the command line.
This allows us to have a different composer name
Sources the activate.sh file or informs the user, that its not
available.
Overriding the cd function, as it was formerly done, is not needed
anymore, activate.sh does this by itself.
This way the user can keep their preferred pushd syntax while enabling
us to use a standard syntax in our defined functions.
To explain further, without a clear value on the PUSHD_MINUS option, we
could be changing the +1/-0 values all we want, that some user would
find that it didn't work for him.
We have two options, then:
- Setting a particular value, which was my first approach.
- Using `emulate -L zsh` to ensure all options defined in the function's
body won't be passed along to the main zsh instance.
For more info see:
http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html#index-emulate