summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/completion.zsh1
-rw-r--r--lib/directories.zsh6
-rw-r--r--lib/grep.zsh6
-rw-r--r--lib/termsupport.zsh20
4 files changed, 21 insertions, 12 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh
index ea6139fde..4b1bb0a62 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -34,7 +34,6 @@ fi
# disable named-directories autocompletion
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
-cdpath=(.)
# Use caching so that commands like apt and dpkg complete are useable
zstyle ':completion::complete:*' use-cache 1
diff --git a/lib/directories.zsh b/lib/directories.zsh
index 1a9698544..3bffa9fd9 100644
--- a/lib/directories.zsh
+++ b/lib/directories.zsh
@@ -24,9 +24,9 @@ alias d='dirs -v | head -10'
# List directory contents
alias lsa='ls -lah'
-alias l='ls -la'
-alias ll='ls -l'
-alias la='ls -lA'
+alias l='ls -lah'
+alias ll='ls -lh'
+alias la='ls -lAh'
# Push and pop directories on directory stack
alias pu='pushd'
diff --git a/lib/grep.zsh b/lib/grep.zsh
index 348ebe623..3fa103d19 100644
--- a/lib/grep.zsh
+++ b/lib/grep.zsh
@@ -3,8 +3,12 @@ grep-flag-available() {
echo | grep $1 "" >/dev/null 2>&1
}
+GREP_OPTIONS=""
+
# color grep results
-GREP_OPTIONS="--color=auto"
+if grep-flag-available --color=auto; then
+ GREP_OPTIONS+=" --color=auto"
+fi
# ignore VCS folders (if the necessary grep flags are available)
VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}"
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 58c6203a0..e1c2e2f93 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -31,13 +31,6 @@ function omz_termsupport_precmd {
fi
title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
-
- # Notify Terminal.app of current directory using undocumented OSC sequence
- # found in OS X 10.9 and 10.10's /etc/bashrc
- if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then
- local PWD_URL="file://$HOSTNAME${PWD// /%20}"
- printf '\e]7;%s\a' "$PWD_URL"
- fi
}
# Runs before executing the command
@@ -58,3 +51,16 @@ function omz_termsupport_preexec {
precmd_functions+=(omz_termsupport_precmd)
preexec_functions+=(omz_termsupport_preexec)
+
+
+# Runs before showing the prompt, to update the current directory in Terminal.app
+function omz_termsupport_cwd {
+ # Notify Terminal.app of current directory using undocumented OSC sequence
+ # found in OS X 10.9 and 10.10's /etc/bashrc
+ if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then
+ local PWD_URL="file://$HOSTNAME${PWD// /%20}"
+ printf '\e]7;%s\a' "$PWD_URL"
+ fi
+}
+
+precmd_functions+=(omz_termsupport_cwd)