sublime symlink disappeared after upgrading to El Capitan

In El Capitan, you are not allowed to write to /usr/bin, but writing to /usr/local/bin is ok. By default, /usr/local/bin should also be in your path variable. Had the same issue. Deleting and recreating the symlink has fixed the problem. Perhaps the current symlink is pointing to the wrong location after the upgrade. sudo rm … Read more

Shortening my prompt in Zsh

Old question, I know, but as an alternative solution I just discovered powerlevel9k, an extension of agnoster (they appear practically identical bar a fair few tweaks), which has this functionality built in. Just set it as your zsh theme, then in .zshrc set POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 which ensures that only two directories are listed. Alternate options are … Read more

How to disable zsh substitution/autocomplete with URL and backslashes

update 2019-05-12: new version(> 486fa10) oh-my-zsh have a configuration for this, add DISABLE_MAGIC_FUNCTIONS=true before source $ZSH/oh-my-zsh.sh: DISABLE_MAGIC_FUNCTIONS=true source $ZSH/oh-my-zsh.sh via: https://github.com/robbyrussell/oh-my-zsh/commit/486fa1010df847bfd8823b4492623afc7c935709 Original answer: This is a bug in zsh 5.1.1 ~ 5.2(current). The plugin bracketed-paste-magic did not works in the zsh versions. The issue is here: https://github.com/zsh-users/zsh-autosuggestions/issues/102 https://github.com/robbyrussell/oh-my-zsh/issues/5499 https://github.com/robbyrussell/oh-my-zsh/commit/35517457921c095be1aa6ed948debfbe183b89ac I suggest you disable bracketed-paste-magic. Comment … Read more

How do zsh ansi colour codes work?

Running the following code in your terminal should tell you whether your terminal supports 256 colors. for COLOR in {0..255} do for STYLE in “38;5″ do TAG=”\033[${STYLE};${COLOR}m” STR=”${STYLE};${COLOR}” echo -ne “${TAG}${STR}${NONE}  ” done echo done it also shows you the code for each color in the form 38;5;x where x is the code for one … Read more

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