How do you determine which theme you are on when ZSH_THEME=”random”

According to oh-my-zsh.sh L81-87: if [ “$ZSH_THEME” = “random” ]; then themes=($ZSH/themes/*zsh-theme) N=${#themes[@]} ((N=(RANDOM%N)+1)) RANDOM_THEME=${themes[$N]} source “$RANDOM_THEME” echo “[oh-my-zsh] Random theme ‘$RANDOM_THEME’ loaded…” Therefore you should be able to print the path to the random theme with print $RANDOM_THEME

How can I get ‘git status’ to always use short format?

Starting git1.8.4 (July 2013), you can configure git status to use short by default. See commit 50e4f757f4adda096239c1ad60499cf606bf2c6f: Some people always run ‘git status -s‘. The configuration variable status.short allows to set it by default. So: git config status.short true And you would be all set! Ben Allred adds in the comments: A quick test shows … Read more

How to prevent bundler from generating binstubs?

Bundler generates binstubs on a per-application basis. If you ran bundle install –binstubs at some point in the past, Bundler will remember that and generate binstubs anytime you run install again. To disable them, you can either run bundle install –no-binstubs, or run rm -rf .bundle/config. Either way, that will disable binstub generation.

ZSH: automatically run ls after every cd

EDIT: After looking at documentation (zshbuiltins, description of cd builtin or hook functions) I found a better way: it is using either chpwd function: function chpwd() { emulate -L zsh ls -a } or using chpwd_functions array: function list_all() { emulate -L zsh ls -a } chpwd_functions=(${chpwd_functions[@]} “list_all”) Put the following into .zshrc: function cd() … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)