From 6a40557a8bc5411881682e3993333da8fbe64e68 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Tue, 31 Dec 2013 14:54:34 +0100 Subject: [PATCH 1/6] Updates spectrum.zsh --- lib/spectrum.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index 166c942fb..b683aca29 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -19,17 +19,19 @@ for color in {000..255}; do BG[$color]="%{[48;5;${color}m%}" done + +ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris} + # Show all 256 colors with color number function spectrum_ls() { for code in {000..255}; do - print -P -- "$code: %F{$code}Test%f" + print -P -- "$code: %F{$code}$ZSH_SPECTRUM_TEXT%f" done } # Show all 256 colors where the background is set to specific color function spectrum_bls() { for code in {000..255}; do - ((cc = code + 1)) - print -P -- "$BG[$code]$code: Test %{$reset_color%}" + print -P -- "$BG[$code]$code: $ZSH_SPECTRUM_TEXT %{$reset_color%}" done } From 56babe6538450f85ac2e8ef3dd04bf1654c46d75 Mon Sep 17 00:00:00 2001 From: Bob Williams Date: Wed, 26 Feb 2014 19:35:24 -0500 Subject: [PATCH 2/6] Adds command line aliases useful for dealing with JSON --- plugins/jsontools/jsontools.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/jsontools/jsontools.plugin.zsh diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh new file mode 100644 index 000000000..51578b349 --- /dev/null +++ b/plugins/jsontools/jsontools.plugin.zsh @@ -0,0 +1,14 @@ +# JSON Tools +# Adds command line aliases useful for dealing with JSON + +if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then + JSONTOOLS_METHOD="" +fi + +if [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then + alias pp_json='python -mjson.tool' +elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then + alias pp_json='ruby -e "require \"json\"; require \"yaml\"; puts JSON.parse(STDIN.read).to_yaml"' +fi + +unset JSONTOOLS_METHOD \ No newline at end of file From 185cb6e37352cc0d92042e35d259b0de3f5f3886 Mon Sep 17 00:00:00 2001 From: Bob Williams Date: Thu, 27 Feb 2014 10:56:07 -0500 Subject: [PATCH 3/6] adding support for node --- plugins/jsontools/jsontools.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh index 51578b349..7b6f8c585 100644 --- a/plugins/jsontools/jsontools.plugin.zsh +++ b/plugins/jsontools/jsontools.plugin.zsh @@ -5,7 +5,9 @@ if [[ $(whence $JSONTOOLS_METHOD) = "" ]]; then JSONTOOLS_METHOD="" fi -if [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then +if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xnode" ) ]]; then + alias pp_json='node -e "console.log(JSON.stringify(process.argv[1]), null, 4)"' +elif [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then alias pp_json='python -mjson.tool' elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then alias pp_json='ruby -e "require \"json\"; require \"yaml\"; puts JSON.parse(STDIN.read).to_yaml"' From f9ad3686bbedea0ca2adf3bc4ab19c3e90e8800a Mon Sep 17 00:00:00 2001 From: ncanceill Date: Sun, 23 Mar 2014 14:39:38 +0100 Subject: [PATCH 4/6] suggest setting $LANG to fix #1286 and fix #1823 --- templates/zshrc.zsh-template | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index c25c20e75..5e1d9b2f1 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -54,6 +54,9 @@ source $ZSH/oh-my-zsh.sh export PATH=$HOME/bin:/usr/local/bin:$PATH # export MANPATH="/usr/local/man:$MANPATH" +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + # # Preferred editor for local and remote sessions # if [[ -n $SSH_CONNECTION ]]; then # export EDITOR='vim' From 04c2d293985adced1bd702fca16357b858002bb8 Mon Sep 17 00:00:00 2001 From: ncanceill Date: Sun, 23 Mar 2014 14:45:55 +0100 Subject: [PATCH 5/6] mention $ZSH_CUSTOM as suggested in #2295 --- templates/zshrc.zsh-template | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 5e1d9b2f1..48757ba0e 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -42,6 +42,9 @@ ZSH_THEME="robbyrussell" # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" # HIST_STAMPS="mm/dd/yyyy" +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) From 6889dfaa46858ddacc82549a57d73118c66a32b6 Mon Sep 17 00:00:00 2001 From: ncanceill Date: Sun, 23 Mar 2014 14:47:10 +0100 Subject: [PATCH 6/6] $ZSH is the OMZ installation folder, not configuration --- templates/zshrc.zsh-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 48757ba0e..7b7f1df85 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -1,4 +1,4 @@ -# Path to your oh-my-zsh configuration. +# Path to your oh-my-zsh installation. export ZSH=$HOME/.oh-my-zsh # Set name of the theme to load.