diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/directories.zsh | 6 | ||||
-rw-r--r-- | lib/termsupport.zsh | 20 |
2 files changed, 16 insertions, 10 deletions
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/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) |