From 5d90f58b37fd67184c4aed3d81a1d3703f8fe832 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Wed, 13 Apr 2011 20:21:13 +0200 Subject: [PATCH 01/31] I should not have merged this here. --- plugins/git-svn/.gitignore | 1 - plugins/git-svn/git-svn.plugin.zsh | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100644 plugins/git-svn/.gitignore delete mode 100644 plugins/git-svn/git-svn.plugin.zsh diff --git a/plugins/git-svn/.gitignore b/plugins/git-svn/.gitignore deleted file mode 100644 index bf5e1a14f..000000000 --- a/plugins/git-svn/.gitignore +++ /dev/null @@ -1 +0,0 @@ -git-svn-clone-externals diff --git a/plugins/git-svn/git-svn.plugin.zsh b/plugins/git-svn/git-svn.plugin.zsh deleted file mode 100644 index 062d63e05..000000000 --- a/plugins/git-svn/git-svn.plugin.zsh +++ /dev/null @@ -1,10 +0,0 @@ - -if ! [ -d "$ZSH/plugins/git-svn/git-svn-clone-externals" ] ;then - git clone https://github.com/andrep/git-svn-clone-externals.git -fi -export PATH="$ZSH/plugins/git-svn/git-svn-clone-externals:$PATH" - -function git_svn_update { - (cd "$ZSH/plugins/git-svn/git-svn-clone-externals" && \ - git pull origin master) -} From a183bcbc6d8d61bd9c1077b45d1c5b3239e96a71 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Thu, 14 Apr 2011 07:17:10 +0200 Subject: [PATCH 02/31] More comments --- plugins/emacs/emacs.plugin.zsh | 25 ++++++++++++++++++++++--- plugins/emacs/emacsclient.sh | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index bca79e70e..62d9fbccc 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -1,11 +1,30 @@ -# Use daemon capabilities of emacs 23 +# Emacs 23 daemon capability is a killing feature. +# One emacs process handles all your frames whether +# you use a frame opened in a terminal via a ssh connection or X frames +# opened on the same host. + +# Benefits are multiple +# - You don't have the cost of starting Emacs all the time anymore +# - Opening a file is as fast as Emacs does not have anything else to do. +# - You can share opened buffered across opened frames. +# - Configuration changes made at runtime are applied to all frames. + + if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then export EDITOR="$ZSH/plugins/emacs/emacsclient.sh" alias emacs="$EDITOR --no-wait" alias e=emacs + # same than M-x eval but from outside Emacs. + alias eeval="emacs --eval" + # create a new X frame + alias eframe='emacsclient --alternate-editor "" --create-frame' + + # to code all night long alias emasc=emacs alias emcas=emacs - # create a new X frame - alias emacs_frame='emacsclient --alternate-editor "" --create-frame' fi + +## Local Variables: +## mode: sh +## End: diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index 3475926a6..b098fd24a 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -6,5 +6,6 @@ x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null` if [ -z "$x" ] ;then emacsclient --alternate-editor "" --create-frame $@ else + # prevent creating another X frame if there is at least one present. emacsclient --alternate-editor "" $@ fi From 49c0a1381a7bd48464a1c33cac6e09770749f795 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Fri, 15 Apr 2011 18:13:01 +0200 Subject: [PATCH 03/31] - Fix pass of parameters - Add new function `ecd'. --- plugins/emacs/emacs.plugin.zsh | 18 +++++++++++++++++- plugins/emacs/emacsclient.sh | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 62d9fbccc..58043040e 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -1,6 +1,6 @@ # Emacs 23 daemon capability is a killing feature. # One emacs process handles all your frames whether -# you use a frame opened in a terminal via a ssh connection or X frames +# you use a frame opened in a terminal via a ssh connection or X frames # opened on the same host. # Benefits are multiple @@ -23,8 +23,24 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then # to code all night long alias emasc=emacs alias emcas=emacs + + # jump to the directory of the current buffer + function ecd { + local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) + (if buf-name + (file-name-directory buf-name)))" + + local dir=`$EDITOR --eval "$cmd" | tr -d \"` + if [ -n "$dir" ] ;then + cd "$dir" + else + echo "can not deduce current buffer filename." >/dev/stderr + return 1 + fi + } fi + ## Local Variables: ## mode: sh ## End: diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index b098fd24a..7fc2ad202 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -4,8 +4,8 @@ x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null` if [ -z "$x" ] ;then - emacsclient --alternate-editor "" --create-frame $@ + emacsclient --alternate-editor "" --create-frame "$@" else # prevent creating another X frame if there is at least one present. - emacsclient --alternate-editor "" $@ + emacsclient --alternate-editor "" "$@" fi From 9b29136ec65953004f064ec4a834ae7b1f2949e7 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Fri, 15 Apr 2011 18:21:22 +0200 Subject: [PATCH 04/31] Fix alias `eeval' --- plugins/emacs/emacs.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 58043040e..fc6b8865e 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -16,7 +16,7 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then alias e=emacs # same than M-x eval but from outside Emacs. - alias eeval="emacs --eval" + alias eeval="$EDITOR --eval" # create a new X frame alias eframe='emacsclient --alternate-editor "" --create-frame' From 6f1929f822d24c6cfc9cecf574cb21c6b3817bb5 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Fri, 15 Apr 2011 18:22:27 +0200 Subject: [PATCH 05/31] Fix indentation --- plugins/emacs/emacs.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index fc6b8865e..3e45e54d0 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -27,8 +27,7 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then # jump to the directory of the current buffer function ecd { local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) - (if buf-name - (file-name-directory buf-name)))" + (if buf-name (file-name-directory buf-name)))" local dir=`$EDITOR --eval "$cmd" | tr -d \"` if [ -n "$dir" ] ;then From 574de93efbba22db0ec816ecec717d502dfa333e Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Tue, 6 Sep 2011 10:50:53 +0200 Subject: [PATCH 06/31] New function `efile` --- plugins/emacs/emacs.plugin.zsh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 3e45e54d0..737abe9d6 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -24,14 +24,22 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then alias emasc=emacs alias emcas=emacs - # jump to the directory of the current buffer + # Write to standard output the path to the file + # opened in the current buffer. + function efile { + local cmd="(buffer-file-name (window-buffer))" + $EDITOR --eval "$cmd" | tr -d \" + } + + # display the directory of the file + # opened in the the current buffer function ecd { local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) (if buf-name (file-name-directory buf-name)))" local dir=`$EDITOR --eval "$cmd" | tr -d \"` if [ -n "$dir" ] ;then - cd "$dir" + echo "$dir" else echo "can not deduce current buffer filename." >/dev/stderr return 1 @@ -39,7 +47,6 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then } fi - ## Local Variables: ## mode: sh ## End: From 7066bf7c6b522af9147ebf03c00361c4c6490d42 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Mon, 10 Oct 2011 14:54:20 +0200 Subject: [PATCH 07/31] Fix builtin `ecd' when file path contains space characters. --- plugins/emacs/emacs.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 737abe9d6..e22f10740 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -31,13 +31,13 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then $EDITOR --eval "$cmd" | tr -d \" } - # display the directory of the file + # Write to standard output the directory of the file # opened in the the current buffer function ecd { local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) (if buf-name (file-name-directory buf-name)))" - local dir=`$EDITOR --eval "$cmd" | tr -d \"` + local dir="$($EDITOR --eval $cmd | tr -d \")" if [ -n "$dir" ] ;then echo "$dir" else From 3a408f326f1436a81ae481610c76c8938903df4f Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Mon, 10 Oct 2011 18:04:13 +0200 Subject: [PATCH 08/31] Comment --- plugins/emacs/emacsclient.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index 7fc2ad202..38d419813 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -1,9 +1,10 @@ #!/bin/sh -# Starts emacs daemon if not already started. - +# get list of available X windows. x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null` + if [ -z "$x" ] ;then + # Create one if there is no X window yet. emacsclient --alternate-editor "" --create-frame "$@" else # prevent creating another X frame if there is at least one present. From a01b1fefe63101fdc36291d0ec2097bdc3994f22 Mon Sep 17 00:00:00 2001 From: Tristan Carel Date: Mon, 10 Oct 2011 18:04:24 +0200 Subject: [PATCH 09/31] Do not overwrite EDITOR environment variable if already defined. --- plugins/emacs/emacs.plugin.zsh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index e22f10740..a3f0085a8 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -11,12 +11,16 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then - export EDITOR="$ZSH/plugins/emacs/emacsclient.sh" - alias emacs="$EDITOR --no-wait" + export EMACS_PLUGIN_LAUNCHER="$ZSH/plugins/emacs/emacsclient.sh" + + # set EDITOR if not already defined. + export EDITOR="${EDITOR:-${EMACS_PLUGIN_LAUNCHER}}" + + alias emacs="$EMACS_PLUGIN_LAUNCHER --no-wait" alias e=emacs # same than M-x eval but from outside Emacs. - alias eeval="$EDITOR --eval" + alias eeval="$EMACS_PLUGIN_LAUNCHER --eval" # create a new X frame alias eframe='emacsclient --alternate-editor "" --create-frame' @@ -28,7 +32,7 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then # opened in the current buffer. function efile { local cmd="(buffer-file-name (window-buffer))" - $EDITOR --eval "$cmd" | tr -d \" + "$EMACS_PLUGIN_LAUNCHER" --eval "$cmd" | tr -d \" } # Write to standard output the directory of the file @@ -37,7 +41,7 @@ if "$ZSH/tools/require_tool.sh" emacs 23 2>/dev/null ; then local cmd="(let ((buf-name (buffer-file-name (window-buffer)))) (if buf-name (file-name-directory buf-name)))" - local dir="$($EDITOR --eval $cmd | tr -d \")" + local dir="$($EMACS_PLUGIN_LAUNCHER --eval $cmd | tr -d \")" if [ -n "$dir" ] ;then echo "$dir" else From 68cec79d32baeb96efc357ba94c0bfe5b4059c90 Mon Sep 17 00:00:00 2001 From: Kyle West Date: Mon, 30 Jan 2012 22:51:58 -0500 Subject: [PATCH 10/31] Added documentation to key bindings. Conflicts: lib/key-bindings.zsh --- lib/key-bindings.zsh | 50 -------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 5f499f3e8..e69de29bb 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -1,50 +0,0 @@ -# TODO: Explain what some of this does.. - -bindkey -e -bindkey '\ew' kill-region -bindkey -s '\el' "ls\n" -bindkey '^r' history-incremental-search-backward -bindkey "^[[5~" up-line-or-history -bindkey "^[[6~" down-line-or-history - -# make search up and down work, so partially type and hit up/down to find relevant stuff -bindkey '^[[A' up-line-or-search -bindkey '^[[B' down-line-or-search - -bindkey "^[[H" beginning-of-line -bindkey "^[[1~" beginning-of-line -bindkey "^[OH" beginning-of-line -bindkey "^[[F" end-of-line -bindkey "^[[4~" end-of-line -bindkey "^[OF" end-of-line -bindkey ' ' magic-space # also do history expansion on space - -bindkey "^[[1;5C" forward-word -bindkey "^[[1;5D" backward-word - -bindkey '^[[Z' reverse-menu-complete - -# Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~ -bindkey '^?' backward-delete-char -bindkey "^[[3~" delete-char -bindkey "^[3;5~" delete-char -bindkey "\e[3~" delete-char - -# consider emacs keybindings: - -#bindkey -e ## emacs key bindings -# -#bindkey '^[[A' up-line-or-search -#bindkey '^[[B' down-line-or-search -#bindkey '^[^[[C' emacs-forward-word -#bindkey '^[^[[D' emacs-backward-word -# -#bindkey -s '^X^Z' '%-^M' -#bindkey '^[e' expand-cmd-path -#bindkey '^[^I' reverse-menu-complete -#bindkey '^X^N' accept-and-infer-next-history -#bindkey '^W' kill-region -#bindkey '^I' complete-word -## Fix weird sequence that rxvt produces -#bindkey -s '^[[Z' '\t' -# From f7708d4181374cfbd223e071f7253018f28e5509 Mon Sep 17 00:00:00 2001 From: Kyle West Date: Mon, 30 Jan 2012 23:04:06 -0500 Subject: [PATCH 11/31] forgot to save before committing. doh --- lib/key-bindings.zsh | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index e69de29bb..195bbb38e 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -0,0 +1,54 @@ +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins +# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets + +bindkey -e # Use emacs key bindings + +bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark +bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls +bindkey -s '\e.' '..\n' # [Esc-.] - run command: .. (up directory) +bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. +bindkey '^[[5~' up-line-or-history # [PageUp] - Up a line of history +bindkey '^[[6~' down-line-or-history # [PageDown] - Down a line of history + +bindkey '^[[A' up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward +bindkey '^[[B' down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward + +bindkey '^[[H' beginning-of-line # [Home] - Go to beginning of line +bindkey '^[[1~' beginning-of-line # [Home] - Go to beginning of line +bindkey '^[OH' beginning-of-line # [Home] - Go to beginning of line +bindkey '^[[F' end-of-line # [End] - Go to end of line +bindkey '^[[4~' end-of-line # [End] - Go to end of line +bindkey '^[OF' end-of-line # [End] - Go to end of line + +bindkey ' ' magic-space # [Space] - do history expansion + +bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word +bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word + +bindkey '^[[Z' reverse-menu-complete # [TODO] - Perform menu completion, like menu-complete, except that if a menu completion is already in progress, move to the previous completion rather than the next. + +# Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~ +bindkey '^?' backward-delete-char # [Delete] - delete backward +bindkey '^[[3~' delete-char # [fn-Delete] - delete forward +bindkey '^[3;5~' delete-char # [TODO] - delete forward +bindkey '\e[3~' delete-char # [TODO] - delete forward + +# consider emacs keybindings: + +#bindkey -e ## emacs key bindings +# +#bindkey '^[[A' up-line-or-search +#bindkey '^[[B' down-line-or-search +#bindkey '^[^[[C' emacs-forward-word +#bindkey '^[^[[D' emacs-backward-word +# +#bindkey -s '^X^Z' '%-^M' +#bindkey '^[e' expand-cmd-path +#bindkey '^[^I' reverse-menu-complete +#bindkey '^X^N' accept-and-infer-next-history +#bindkey '^W' kill-region +#bindkey '^I' complete-word +## Fix weird sequence that rxvt produces +#bindkey -s '^[[Z' '\t' +# From 3839c6e9e62a2671b1d3f5662e4d2bc3984c3f9e Mon Sep 17 00:00:00 2001 From: Mat Schaffer Date: Sat, 17 Mar 2012 22:03:01 -0300 Subject: [PATCH 12/31] Don't clobber standard Esc+. behavior Esc+. works as "last arg" on both bash and zsh. Seems like a shame to introduce a new standard. Conflicts: lib/key-bindings.zsh --- lib/key-bindings.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 195bbb38e..8168c8d90 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -6,7 +6,6 @@ bindkey -e # Use emacs key bindings bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls -bindkey -s '\e.' '..\n' # [Esc-.] - run command: .. (up directory) bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. bindkey '^[[5~' up-line-or-history # [PageUp] - Up a line of history bindkey '^[[6~' down-line-or-history # [PageDown] - Down a line of history From ff0cafa14db5b728f823ee486ec1bf5a9d2725eb Mon Sep 17 00:00:00 2001 From: Felix Dreissig Date: Sun, 14 Oct 2012 00:07:47 +0200 Subject: [PATCH 13/31] Make sure the terminal is always in application mode when zle is active. --- lib/key-bindings.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 8168c8d90..a57b04122 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -2,6 +2,19 @@ # http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins # http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets +# Make sure that the terminal is in application mode when zle is active, since +# only then values from $terminfo are valid +if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then + function zle-line-init() { + echoti smkx + } + function zle-line-finish() { + echoti rmkx + } + zle -N zle-line-init + zle -N zle-line-finish +fi + bindkey -e # Use emacs key bindings bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark From 174c9177aa34b4c05bb5a1c6f637e6fa479a8e10 Mon Sep 17 00:00:00 2001 From: Felix Dreissig Date: Sun, 14 Oct 2012 02:32:48 +0200 Subject: [PATCH 14/31] Replace hardcoded key escape sequeneces with dynamic ones from terminfo. --- lib/key-bindings.zsh | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index a57b04122..4a00764da 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -20,31 +20,24 @@ bindkey -e # Use emacs key bindings bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. -bindkey '^[[5~' up-line-or-history # [PageUp] - Up a line of history -bindkey '^[[6~' down-line-or-history # [PageDown] - Down a line of history +bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history +bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history -bindkey '^[[A' up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward -bindkey '^[[B' down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward +bindkey "${terminfo[kcuu1]}" up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward +bindkey "${terminfo[kcud1]}" down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward -bindkey '^[[H' beginning-of-line # [Home] - Go to beginning of line -bindkey '^[[1~' beginning-of-line # [Home] - Go to beginning of line -bindkey '^[OH' beginning-of-line # [Home] - Go to beginning of line -bindkey '^[[F' end-of-line # [End] - Go to end of line -bindkey '^[[4~' end-of-line # [End] - Go to end of line -bindkey '^[OF' end-of-line # [End] - Go to end of line +bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line +bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line bindkey ' ' magic-space # [Space] - do history expansion bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word -bindkey '^[[Z' reverse-menu-complete # [TODO] - Perform menu completion, like menu-complete, except that if a menu completion is already in progress, move to the previous completion rather than the next. +bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Shift-Tab] - move through the completion menu backwards -# Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~ -bindkey '^?' backward-delete-char # [Delete] - delete backward -bindkey '^[[3~' delete-char # [fn-Delete] - delete forward -bindkey '^[3;5~' delete-char # [TODO] - delete forward -bindkey '\e[3~' delete-char # [TODO] - delete forward +bindkey '^?' backward-delete-char # [Backspace] - delete backward +bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward # consider emacs keybindings: From 46ad7338333b57ce5966ca481d132d8626304d83 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Tue, 18 Dec 2012 08:16:28 +0000 Subject: [PATCH 15/31] more catspeak --- plugins/lol/lol.plugin.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index ae065c12f..3b92533a8 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -36,3 +36,12 @@ alias nomnom='killall' alias byes='exit' alias cya='reboot' alias kthxbai='halt' + +alias pwned='ssh' + +alias hackzor='git init' +alias rulz='git push' +alias bringz='git pull' +alias moarhack='git checkout' +alias chicken='git add' + From c95b6d91f7e45ac4ca9a1ce2207db7d515ba450b Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Tue, 18 Dec 2012 08:47:04 +0000 Subject: [PATCH 16/31] git lol --- plugins/lol/lol.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index 3b92533a8..1b32ec2e4 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -42,6 +42,9 @@ alias pwned='ssh' alias hackzor='git init' alias rulz='git push' alias bringz='git pull' -alias moarhack='git checkout' alias chicken='git add' +alias oanward='git commit -m' +alias ooanward='git commit -am' +alias letcat='git checkout' +alias violenz='git rebase' From ae1973de443525daeb87df9973ae83c6c9210cfe Mon Sep 17 00:00:00 2001 From: Ron Shapiro Date: Mon, 29 Apr 2013 10:18:32 -0400 Subject: [PATCH 17/31] plugged_in function --- plugins/battery/battery.plugin.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 0c7c9421f..785386a12 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -16,12 +16,16 @@ if [[ $(uname) == "Darwin" ]] ; then integer i=$(((currentcapacity/maxcapacity) * 100)) echo $i } + + function plugged_in() { + [ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ Yes') -eq 1 ] + } function battery_pct_remaining() { - if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then - battery_pct - else + if plugged_in ; then echo "External Power" + else + battery_pct fi } From dd220152be26163c93ed1c0f9f98e7bad0653941 Mon Sep 17 00:00:00 2001 From: Dimitri Jorge Date: Sun, 1 Sep 2013 18:20:08 +0200 Subject: [PATCH 18/31] Add autocompletion plugin for meteor command --- plugins/meteor/_meteor | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/meteor/_meteor diff --git a/plugins/meteor/_meteor b/plugins/meteor/_meteor new file mode 100644 index 000000000..c90ed6caf --- /dev/null +++ b/plugins/meteor/_meteor @@ -0,0 +1,32 @@ +#compdef meteor +#autoload + +# Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion +# Original author: Dimitri JORGE (https://github.com/jorge-d) + +local -a _1st_arguments +_1st_arguments=( + 'run:[Default] Run this project in local development mode' + 'create:Create a new project' + 'update:Upgrade this project to the latest version of Meteor' + 'add:Add a package to this project' + 'remove:Remove a package from this project' + 'list:List available packages' + 'help:Display Meteor help' + 'bundle:Pack this project up into a tarball' + 'mongo:Connect to the Mongo database for the specified site' + 'deploy:Deploy this project to Meteor' + 'logs:Show logs for specified site' + 'reset:Reset the project state. Erases the local database.' + 'test-packages:Test one or more packages' +) + +if (( CURRENT == 2 )); then + _describe -t commands "meteor subcommand" _1st_arguments + return +fi + +case "$words[2]" in + help) + _describe -t commands "brew subcommand" _1st_arguments +esac \ No newline at end of file From 90b83b81017bbf55d5c10e6bced835f6d184499d Mon Sep 17 00:00:00 2001 From: Dimitri Jorge Date: Sun, 1 Sep 2013 19:23:21 +0200 Subject: [PATCH 19/31] Add completion for package add and remove --- plugins/meteor/_meteor | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/meteor/_meteor b/plugins/meteor/_meteor index c90ed6caf..cd7fc304f 100644 --- a/plugins/meteor/_meteor +++ b/plugins/meteor/_meteor @@ -4,6 +4,13 @@ # Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion # Original author: Dimitri JORGE (https://github.com/jorge-d) +_meteor_all_packages() { + packages=(`meteor list | cut -d" " -f1`) +} +_meteor_installed_packages() { + installed_packages=(`meteor list --using`) +} + local -a _1st_arguments _1st_arguments=( 'run:[Default] Run this project in local development mode' @@ -21,6 +28,9 @@ _1st_arguments=( 'test-packages:Test one or more packages' ) +local expl +local -a packages installed_packages + if (( CURRENT == 2 )); then _describe -t commands "meteor subcommand" _1st_arguments return @@ -28,5 +38,11 @@ fi case "$words[2]" in help) - _describe -t commands "brew subcommand" _1st_arguments + _describe -t commands "meteor subcommand" _1st_arguments ;; + remove) + _meteor_installed_packages + _wanted installed_packages expl 'installed packages' compadd -a installed_packages ;; + add) + _meteor_all_packages + _wanted packages expl 'all packages' compadd -a packages ;; esac \ No newline at end of file From 190fcdffa7bc413dc7a9ebef4a6eaed37beb6896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20M=C4=83gheru=C8=99an-Stanciu?= Date: Wed, 9 Oct 2013 16:42:28 +0200 Subject: [PATCH 20/31] Added a completion plugin for the new aws-cli tool It also supports quickly switching AWS profiles defined in ~/.aws/config using the asp alias --- plugins/aws/aws.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/aws/aws.plugin.zsh diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh new file mode 100644 index 000000000..3f7fb1995 --- /dev/null +++ b/plugins/aws/aws.plugin.zsh @@ -0,0 +1,17 @@ +export AWS_HOME=~/.aws + +function agp { + echo $AWS_DEFAULT_PROFILE + +} +function asp { + export AWS_DEFAULT_PROFILE=$1 + export RPROMPT="" + +} +function aws_profiles { + reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/')) +} + +compctl -K aws_profiles asp +source `which aws_zsh_completer.sh` From be6b1b3b8fda01bebc499e02b6945eaddaf45b84 Mon Sep 17 00:00:00 2001 From: Foivos Date: Sun, 8 Dec 2013 07:11:33 +0200 Subject: [PATCH 21/31] Improve comments --- templates/zshrc.zsh-template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index b2cad20e8..869bd52c3 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -11,13 +11,13 @@ ZSH_THEME="robbyrussell" # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -# Set to this to use case-sensitive completion +# Set this to use case-sensitive completion # CASE_SENSITIVE="true" # Uncomment this to disable bi-weekly auto-update checks # DISABLE_AUTO_UPDATE="true" -# Uncomment to change how often before auto-updates occur? (in days) +# Uncomment to change how often to auto-update? (in days) # export UPDATE_ZSH_DAYS=13 # Uncomment following line if you want to disable colors in ls @@ -37,9 +37,9 @@ ZSH_THEME="robbyrussell" # much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" -# Uncomment following line if you want to shown in the command execution time stamp -# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"| -# yyyy-mm-dd +# Uncomment following line if you want to the command execution time stamp shown +# in the history command output. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" # HIST_STAMPS="mm/dd/yyyy" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) From e97811913b9349349e35853a8c2fe3e93cabacd9 Mon Sep 17 00:00:00 2001 From: Foivos Date: Sun, 8 Dec 2013 07:16:40 +0200 Subject: [PATCH 22/31] Improve comments --- templates/zshrc.zsh-template | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 869bd52c3..c2254d055 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -66,4 +66,3 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH # ssh # export SSH_KEY_PATH="~/.ssh/dsa_id" - From a6671919ab2a5b0732dbc07d6f8becd9346917da Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 22:52:18 +0100 Subject: [PATCH 23/31] Fixes _rails_command Changes precedence of the conditional clause, more recent versions come first now. Fixes problems when users update their app and still have the old rails files inside of their file tree. Closes #2405 - check the discussion there for further info. --- plugins/rails/rails.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 23d15a9a1..210fdfcf7 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -1,10 +1,10 @@ function _rails_command () { - if [ -e "script/server" ]; then - ruby script/$@ + if [ -e "bin/rails" ]; then + bin/rails $@ elif [ -e "script/rails" ]; then ruby script/rails $@ - elif [ -e "bin/rails" ]; then - bin/rails $@ + elif [ -e "script/server" ]; then + ruby script/$@ else rails $@ fi From f3f0a54259f384c35dad48a40d6e931df079b3c9 Mon Sep 17 00:00:00 2001 From: Ed Lui Date: Tue, 11 Feb 2014 22:45:41 -0500 Subject: [PATCH 24/31] Updated _brew zsh autocompletion to latest Homebrew upstream --- plugins/brew/_brew | 75 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 16 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index d4306f223..9eb3bb557 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -11,10 +11,25 @@ _brew_installed_formulae() { installed_formulae=(`brew list`) } +_brew_installed_taps() { + installed_taps=(`brew tap`) +} + +_brew_outdated_formulae() { + outdated_formulae=(`brew outdated`) +} + +_brew_running_services() { + running_services=(`brew services list | awk '{print $1}'`) +} + local -a _1st_arguments _1st_arguments=( + 'audit:check formulae for Homebrew coding style' + 'bundle:look for a Brewfile and run each line as a brew command' 'cat:display formula file for a formula' 'cleanup:uninstall unused and old versions of packages' + 'commands:show a list of commands' 'create:create a new formula' 'deps:list dependencies and dependants of a formula' 'doctor:audits your installation for common issues' @@ -22,27 +37,38 @@ _1st_arguments=( 'home:visit the homepage of a formula or the brew project' 'info:information about a formula' 'install:install a formula' + 'reinstall:install a formula anew; re-using its current options' 'link:link a formula' 'list:list files in a formula or not-installed formulae' 'log:git commit log for a formula' 'missing:check all installed formuale for missing dependencies.' - 'options:display install options specific to formula.' - 'outdated:list formulas for which a newer version is available' + 'outdated:list formulae for which a newer version is available' + 'pin:pin specified formulae' 'prune:remove dead links' - 'reinstall:reinstall a formula' 'remove:remove a formula' 'search:search for a formula (/regex/ or string)' 'server:start a local web app that lets you browse formulae (requires Sinatra)' - 'services:manage background services via launchctl' + 'services:small wrapper around `launchctl` for supported formulae' + 'tap:tap a new formula repository from GitHub, or list existing taps' 'unlink:unlink a formula' + 'unpin:unpin specified formulae' + 'untap:remove a tapped repository' 'update:freshen up links' 'upgrade:upgrade outdated formulae' - 'uses:show formulas which depend on a formula' - 'versions:show all available formula versions' + 'uses:show formulae which depend on a formula' +) + +local -a _service_arguments +_service_arguments=( + 'cleanup:get rid of stale services and unused plists' + 'list:list all services managed by `brew services`' + 'restart:gracefully restart selected service' + 'start:start selected service' + 'stop:stop selected service' ) local expl -local -a formulae installed_formulae +local -a formulae installed_formulae installed_taps outdated_formulae running_services _arguments \ '(-v)-v[verbose]' \ @@ -61,24 +87,41 @@ if (( CURRENT == 1 )); then fi case "$words[1]" in - search|-S) - _arguments \ - '(--macports)--macports[search the macports repository]' \ - '(--fink)--fink[search the fink repository]' ;; + install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|edit|options) + _brew_all_formulae + _wanted formulae expl 'all formulae' compadd -a formulae ;; list|ls) _arguments \ '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ + '(--pinned)--pinned[list all versions of pinned formulae]' \ '(--versions)--versions[list all installed versions of a formula]' \ - '1: :->forms' && return 0 + '1: :->forms' && return 0 if [[ "$state" == forms ]]; then _brew_installed_formulae _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae fi ;; - install|home|homepage|log|info|abv|uses|cat|deps|edit|options|versions) - _brew_all_formulae - _wanted formulae expl 'all formulae' compadd -a formulae ;; - reinstall|remove|rm|uninstall|unlink|cleanup|link|ln) + remove|rm|uninstall|unlink|cleanup|link|ln|pin|unpin) _brew_installed_formulae _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; + search|-S) + _arguments \ + '(--macports)--macports[search the macports repository]' \ + '(--fink)--fink[search the fink repository]' ;; + services) + if [[ -n "$words[2]" ]]; then + case "$words[2]" in + restart|start|stop) + _brew_running_services + _wanted running_services expl 'running services' compadd -a running_services ;; + esac + else + _describe -t commands "brew services subcommand" _service_arguments + fi ;; + untap) + _brew_installed_taps + _wanted installed_taps expl 'installed taps' compadd -a installed_tapsĀ ;; + upgrade) + _brew_outdated_formulae + _wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;; esac From 5bd590ceb30ca58d96ec8d5dcfc1fec71bc6ca1f Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Sat, 8 Mar 2014 13:13:52 -0800 Subject: [PATCH 25/31] Reference default install path from ZSH variable --- tools/install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index b24bb4ad3..01984ea2b 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,16 +1,16 @@ -ZSH=`/usr/bin/env|grep 'ZSH='|cut -d '=' -f 2` -if [ -d "$ZSH" ] +if [ ! -n $ZSH ] +then + ZSH=~/.oh-my-zsh +fi + +if [ -d $ZSH ] then echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install" exit -elif [ -d ~/.oh-my-zsh ] -then - echo "\033[0;33mYou already have One Oh My Zsh Directory.\033[0m You'll need to remove ~/.oh-my-zsh if you want to clone" - exit fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { +hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { echo "git not installed" exit } @@ -23,7 +23,7 @@ then fi echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" -cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc +cp $ZSH/templates/zshrc.zsh-template ~/.zshrc echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" sed -i -e "/export PATH=/ c\\ From 2e11e2ab5adaea762b7f2eaa6c63332a9618bb3f Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Sat, 8 Mar 2014 13:15:18 -0800 Subject: [PATCH 26/31] Write install path into .zshrc --- tools/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index 01984ea2b..5c7a5b6ca 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,6 +24,9 @@ fi echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" cp $ZSH/templates/zshrc.zsh-template ~/.zshrc +sed -i -e "/^ZSH=/ c\\ +ZSH=$ZSH +" ~/.zshrc echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" sed -i -e "/export PATH=/ c\\ From da1fa3b06a6369a5b3337025da164eeec275db70 Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Sat, 8 Mar 2014 13:17:16 -0800 Subject: [PATCH 27/31] Abort installer on errors --- tools/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index 5c7a5b6ca..343f251ae 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,3 +1,5 @@ +set -e + if [ ! -n $ZSH ] then ZSH=~/.oh-my-zsh From 9f66d5b797ab73a54d944a7bd43d920a508625ea Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Mon, 23 Apr 2012 14:01:14 -0700 Subject: [PATCH 28/31] Document alternate install paths via ZSH variable Uses environment variable $ZSH to configure install location. --- README.textile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 810569486..0fa9b30ec 100644 --- a/README.textile +++ b/README.textile @@ -20,8 +20,18 @@ h4. via `wget` @wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh@ -h3. The manual way +h4. Optional: change the install directory +The default location is `~/.oh-my-zsh` (hidden in your home directory). + +You can change the install directory with the ZSH environment variable, either +by running `export ZSH=/your/path` before installing, or setting it before the +end of the install pipeline like this: + +@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ + + +h3. The manual way 1. Clone the repository @@ -35,7 +45,6 @@ h3. The manual way @cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ - 4. Set zsh as your default shell: @chsh -s /bin/zsh@ @@ -46,6 +55,8 @@ h3. Problems? You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. +If you installed manually or changed the install location, check ZSH in ~/.zshrc + h2. Usage * enable the plugins you want in your @~/.zshrc@ (take a look at @plugins/@ to see what's possible) From b9841b0bae97049d426c652f6a9be361c7492040 Mon Sep 17 00:00:00 2001 From: Samvel Khalatyan Date: Mon, 10 Mar 2014 17:18:50 -0500 Subject: [PATCH 29/31] Add github url shortener --- plugins/github/github.plugin.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 66a10cfdb..25b1a1e1b 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -84,5 +84,14 @@ exist_gh() { # [DIRECTORY] git push -u origin master } +# git.io "GitHub URL" +# +# Shorten GitHub url, example: +# https://github.com/nvogel/dotzsh > http://git.io/8nU25w +# source: https://github.com/nvogel/dotzsh +# documentation: https://github.com/blog/985-git-io-github-url-shortener +# +git.io() {curl -i -s http://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "} + # End Functions ############################################################# From 5f5e5508b0560339f7f57fa125496d0b9f1ea077 Mon Sep 17 00:00:00 2001 From: Jon Tewksbury Date: Wed, 12 Mar 2014 22:37:25 -0700 Subject: [PATCH 30/31] Update license year Fix outdated copyright year (updated to 2014). The copyright year was out of date. Copyright notices must reflect the current year, so this commit updates the listed year to 2014. See http://www.copyright.gov/circs/circ01.pdf for more info. --- MIT-LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt index f6edab65b..6eb8aab34 100644 --- a/MIT-LICENSE.txt +++ b/MIT-LICENSE.txt @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2009-2013 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) +Copyright (c) 2009-2014 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 47b0d754ae368af16957903f203ee902c7faeec1 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 13 Mar 2014 10:15:18 -0700 Subject: [PATCH 31/31] Fixing a few quirks in the latest installer updates (quoting /Users/robbyrussell/.oh-my-zsh and such). Also mentioining our twitter account after install --- tools/install.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 343f251ae..71e19a389 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,12 +1,10 @@ set -e -if [ ! -n $ZSH ] -then +if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh fi -if [ -d $ZSH ] -then +if [ -d "$ZSH" ]; then echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install" exit fi @@ -18,8 +16,7 @@ hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh } echo "\033[0;34mLooking for an existing zsh config...\033[0m" -if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] -then +if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m"; mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; fi @@ -43,9 +40,8 @@ echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" -echo "\033[0;32m"' /____/ '"\033[0m" - -echo "\n\n \033[0;32m....is now installed.\033[0m" +echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" +echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" /usr/bin/env zsh . ~/.zshrc