diff options
-rw-r--r-- | plugins/urltools/urltools.plugin.zsh | 4 | ||||
-rw-r--r-- | templates/zshrc.zsh-template | 3 | ||||
-rw-r--r-- | themes/agnoster.zsh-theme | 6 | ||||
-rw-r--r-- | tools/check_for_upgrade.sh | 8 |
4 files changed, 15 insertions, 6 deletions
diff --git a/plugins/urltools/urltools.plugin.zsh b/plugins/urltools/urltools.plugin.zsh index 0d29314d6..3de74ae3d 100644 --- a/plugins/urltools/urltools.plugin.zsh +++ b/plugins/urltools/urltools.plugin.zsh @@ -4,6 +4,6 @@ # Taken from: # http://ruslanspivak.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/ -alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' +alias urlencode='node -e "console.log(encodeURIComponent(process.argv[1]))"' -alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
\ No newline at end of file +alias urldecode='node -e "console.log(decodeURIComponent(process.argv[1]))"' diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index e52553241..758fc26b8 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -17,6 +17,9 @@ ZSH_THEME="robbyrussell" # Comment this out to disable weekly auto-update checks # DISABLE_AUTO_UPDATE="true" +# Change this value to set how frequently ZSH updates¬ +export UPDATE_ZSH_DAYS=13 + # Uncomment following line if you want to disable colors in ls # DISABLE_LS_COLORS="true" diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 84b9649a6..bd6f1a6a2 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -73,7 +73,7 @@ prompt_git() { if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then ZSH_THEME_GIT_PROMPT_DIRTY='±' dirty=$(parse_git_dirty) - ref=$(git symbolic-Fref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" + ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" if [[ -n $dirty ]]; then prompt_segment yellow black else @@ -106,10 +106,10 @@ prompt_status() { build_prompt() { RETVAL=$? prompt_status - prompt_contextx + prompt_context prompt_dir prompt_git prompt_end } -PROMPT='%{%f%b%k%}$(build_prompt) '
\ No newline at end of file +PROMPT='%{%f%b%k%}$(build_prompt) ' diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 612901cbe..581f03a07 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -14,6 +14,12 @@ function _upgrade_zsh() { _update_zsh_update } +epoch_target=$UPDATE_ZSH_DAYS +if [[ -z "$epoch_target" ]]; then + # Default to old behavior + epoch_target=13 +fi + if [ -f ~/.zsh-update ] then . ~/.zsh-update @@ -23,7 +29,7 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt 13 ] + if [ $epoch_diff -gt $epoch_target ] then if [ "$DISABLE_UPDATE_PROMPT" = "true" ] then |