summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/aliases.zsh3
-rw-r--r--lib/directories.zsh5
-rw-r--r--plugins/cap/cap.plugin.zsh41
-rw-r--r--plugins/capistrano/_capistrano10
-rw-r--r--templates/zshrc.zsh-template6
5 files changed, 15 insertions, 50 deletions
diff --git a/lib/aliases.zsh b/lib/aliases.zsh
index 0555be264..14f6ad289 100644
--- a/lib/aliases.zsh
+++ b/lib/aliases.zsh
@@ -16,8 +16,9 @@ alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lah'
-alias l='ls -la'
+alias l='ls -lA1'
alias ll='ls -l'
+alias la='ls -lA'
alias sl=ls # often screw this up
alias afind='ack-grep -il'
diff --git a/lib/directories.zsh b/lib/directories.zsh
index a787db9eb..e445eb84c 100644
--- a/lib/directories.zsh
+++ b/lib/directories.zsh
@@ -37,8 +37,3 @@ cd () {
alias md='mkdir -p'
alias rd=rmdir
alias d='dirs -v | head -10'
-
-# mkdir & cd to it
-function mcd() {
- mkdir -p "$1" && cd "$1";
-}
diff --git a/plugins/cap/cap.plugin.zsh b/plugins/cap/cap.plugin.zsh
deleted file mode 100644
index d22d10401..000000000
--- a/plugins/cap/cap.plugin.zsh
+++ /dev/null
@@ -1,41 +0,0 @@
-stat -f%m . > /dev/null 2>&1
-if [ "$?" = 0 ]; then
- stat_cmd=(stat -f%m)
-else
- stat_cmd=(stat -L --format=%y)
-fi
-
-# Cache filename
-_cap_show_undescribed_tasks=0
-
-# Cache filename
-_cap_task_cache_file='.cap_task_cache'
-
-_cap_get_task_list () {
- if [ ${_cap_show_undescribed_tasks} -eq 0 ]; then
- cap -T | grep '^cap' | cut -d " " -f 2
- else
- cap -vT | grep '^cap' | cut -d " " -f 2
- fi
-}
-
-_cap_does_task_list_need_generating () {
-
- if [ ! -f ${_cap_task_cache_file} ]; then return 0;
- else
- accurate=$($stat_cmd $_cap_task_cache_file)
- changed=$($stat_cmd config/deploy.rb)
- return $(expr $accurate '>=' $changed)
- fi
-}
-
-function _cap () {
- if [ -f config/deploy.rb ]; then
- if _cap_does_task_list_need_generating; then
- _cap_get_task_list > ${_cap_task_cache_file}
- fi
- compadd `cat ${_cap_task_cache_file}`
- fi
-}
-
-compdef _cap cap
diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano
new file mode 100644
index 000000000..cf6b50c7f
--- /dev/null
+++ b/plugins/capistrano/_capistrano
@@ -0,0 +1,10 @@
+#compdef cap
+#autoload
+
+if [ -f config/deploy.rb ]; then
+ if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
+ echo "\nGenerating .cap_tasks~..." > /dev/stderr
+ cap --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
+ fi
+ compadd `cat .cap_tasks~`
+fi
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 758fc26b8..2ea9934af 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -14,11 +14,11 @@ ZSH_THEME="robbyrussell"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
-# Comment this out to disable weekly auto-update checks
+# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
-# Change this value to set how frequently ZSH updates¬
-export UPDATE_ZSH_DAYS=13
+# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
+# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"