From 358b6ffcde9e3732ed08387fc176851e07c1862f Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Tue, 18 Feb 2014 14:37:59 -0700 Subject: [PATCH 1/5] Add cabal_sandbox_info function Reports whether the current working directory is within a sandbox. Useful to check before installing Cabal packages into the global registry. --- plugins/cabal/cabal.plugin.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 8d3c64587..9f76add7a 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -1,3 +1,14 @@ +function cabal_sandbox_info() { + cabal_files=(*.cabal(N)) + if [ $#cabal_files -gt 0 ]; then + if [ -f cabal.sandbox.config ]; then + echo "%{$fg[green]%}sandboxed%{$reset_color%}" + else + echo "%{$fg[red]%}not sandboxed%{$reset_color%}" + fi + fi +} + function _cabal_commands() { local ret=1 state _arguments ':subcommand:->subcommand' && ret=0 From 1df7d01618f06cc80b7f9d14bd088c70e6382d33 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Tue, 18 Feb 2014 14:43:42 -0700 Subject: [PATCH 2/5] Fix URL to gi (gitignore) function Previous URL doesn't seem to work because the host requires a www prefix. --- plugins/gitignore/gitignore.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 332497cec..be3c3a635 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,4 +1,4 @@ -function gi() { curl http://gitignore.io/api/$@ ;} +function gi() { curl http://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { curl -s http://gitignore.io/api/list | tr "," "\n" From bd4f7e24ea1451eeab351b0a68ac3729213b369b Mon Sep 17 00:00:00 2001 From: Alexander Hramov Date: Wed, 19 Feb 2014 15:08:47 +0300 Subject: [PATCH 3/5] Update gitignore.plugin.zsh Fix URL to gi (gitignore) function in _gitignireio_get_command_list function --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index be3c3a635..be037d87a 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ function gi() { curl http://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { - curl -s http://gitignore.io/api/list | tr "," "\n" + curl -s http://www.gitignore.io/api/list | tr "," "\n" } _gitignireio () { @@ -9,4 +9,4 @@ _gitignireio () { compadd -S '' `_gitignireio_get_command_list` } -compdef _gitignireio gi \ No newline at end of file +compdef _gitignireio gi From c0f716b2e5ce7bd36baf812e8b6175a65bb1097e Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Wed, 19 Feb 2014 13:33:02 -0700 Subject: [PATCH 4/5] Fix remaining broken URL in gitignore function --- plugins/gitignore/gitignore.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index be3c3a635..4f68831da 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ function gi() { curl http://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { - curl -s http://gitignore.io/api/list | tr "," "\n" + curl -s http://www.gitignore.io/api/list | tr "," "\n" } _gitignireio () { From 598a9c6f990756386517d66b6bcf77e53791e905 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 20 Feb 2014 10:18:53 -0800 Subject: [PATCH 5/5] Adieu l'ami. @jimweirich -- You will be missed. --- plugins/rake/rake.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/rake/rake.plugin.zsh b/plugins/rake/rake.plugin.zsh index 16b933c14..121150017 100644 --- a/plugins/rake/rake.plugin.zsh +++ b/plugins/rake/rake.plugin.zsh @@ -1,3 +1,7 @@ +# Thank you Jim for everything you contributed to the Ruby and open source community +# over the years. We will miss you dearly. +alias jimweirich="rake" + alias rake="noglob rake" # allows square brackts for rake task invocation alias brake='noglob bundle exec rake' # execute the bundled rake gem alias srake='noglob sudo rake' # noglob must come before sudo