diff --git a/modules/completion/external b/modules/completion/external index 2166ab8a6c..9cbd2b6762 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit 2166ab8a6c57d1d9115e34f51c3dc05ba15480c5 +Subproject commit 9cbd2b6762689cd92c194067ac51b376fcc91e1b diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 042e1a0330..3ffad63318 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -30,9 +30,6 @@ setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a traili unsetopt MENU_COMPLETE # Do not autoselect the first completion entry. unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor. -# Treat these characters as part of a word. -WORDCHARS='*?_-.[]~&;!#$%^(){}<>' - # # Styles # diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index d76c605719..b905face3a 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -57,6 +57,9 @@ setopt BEEP # Variables # +# Treat these characters as part of a word. +WORDCHARS='*?_-.[]~&;!#$%^(){}<>' + # Use human-friendly identifiers. zmodload zsh/terminfo typeset -gA key_info diff --git a/modules/emacs/README.md b/modules/emacs/README.md new file mode 100644 index 0000000000..fa9a514b39 --- /dev/null +++ b/modules/emacs/README.md @@ -0,0 +1,33 @@ +Emacs +===== + +Enables Emacs dependency management. + +Dependency management +--------------------- + +[Carton][1] installs and manages Emacs packages for Emacs package development +and Emacs configuration. + +This module prepends the Carton directory to the path variable to enable the +execution of `carton`. + +Aliases +------- + +### Carton + + - `cai` installs dependencies. + - `cau` updates dependencies. + - `caI` initializes the current directory for dependency management. + - `cae` executes a command which correct dependencies. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][2].* + + - [Sebastian Wiesner](https://github.com/lunaryorn) + +[1]: https://github.com/rejeep/carton +[2]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/emacs/init.zsh b/modules/emacs/init.zsh new file mode 100644 index 0000000000..c24625d1f8 --- /dev/null +++ b/modules/emacs/init.zsh @@ -0,0 +1,15 @@ +# +# Configures Emacs dependency management. +# +# Authors: Sebastian Wiesner +# + +# Enable Carton +if [[ -d "$HOME/.carton" ]]; then + path=($HOME/.carton/bin $path) + + alias cai='carton install' + alias cau='carton update' + alias caI='carton init' + alias cae='carton exec' +fi diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh index 79eba54d28..d05aa07b0c 100644 --- a/modules/environment/init.zsh +++ b/modules/environment/init.zsh @@ -17,6 +17,8 @@ zle -N self-insert url-quote-magic # setopt BRACE_CCL # Allow brace character class list expansion. +setopt COMBINING_CHARS # Combine zero-length punctuation characters (accents) + # with the base character. setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'. unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed. diff --git a/modules/git/README.md b/modules/git/README.md index 717f42bb14..1370f4988d 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -1,7 +1,8 @@ Git === -Enhances the [Git][1] distributed version control system by providing aliases, functions and by exposing repository status information to prompts. +Enhances the [Git][1] distributed version control system by providing aliases, +functions and by exposing repository status information to prompts. Git **1.7.2** is the [minimum required version][7]. @@ -12,7 +13,7 @@ Settings The format of the [git-log][8] output is configurable via the following style, where context is *brief*, *oneline*, and *medium*, which will be passed to the -`--prety=format:` switch. +`--pretty=format:` switch. zstyle ':prezto:module:git:log:context' format '' @@ -38,8 +39,8 @@ Aliases - `gbc` creates a new branch. - `gbl` lists branches and their commits. - `gbL` lists local and remote branches and their commits. - - `gbs` lists branches and their commits with ancestery graphs. - - `gbS` lists local and remote branches and their commits with ancestery + - `gbs` lists branches and their commits with ancestry graphs. + - `gbS` lists local and remote branches and their commits with ancestry graphs. - `gbx` deletes a branch. - `gbX` deletes a branch irrespective of its merged status. @@ -65,6 +66,16 @@ Aliases - `gcs` displays various types of objects. - `gcl` displays lost commits. +### Conflict + + - `gCl` lists unmerged files. + - `gCa` adds unmerged file contents to the index. + - `gCe` executes merge-tool on all unmerged file. + - `gCo` checks out our changes for unmerged paths. + - `gCO` checks out our changes for all unmerged paths. + - `gCt` checks out their changes for unmerged paths. + - `gCT` checks out their changes for all unmerged paths. + ### Data - `gd` displays information about files in the index and the work tree. @@ -103,16 +114,6 @@ Aliases - `gix` removes files/directories from the index (recursively). - `giX` removes files/directories from the index (recursively and forced). -### Conflict - - - `gCl` lists unmerged files. - - `gCa` adds unmerged file contents to the index. - - `gCe` executes merge-tool on all unmerged file. - - `gCo` checks out our changes for unmerged paths. - - `gCO` checks out our changes for all unmerged paths. - - `gCt` checks out their changes for unmerged paths. - - `gCT` checks out their changes for all unmerged paths. - ### Log - `gl` displays the log. diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index 4cb10dc2ce..173f619da7 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -56,6 +56,15 @@ alias gcR='git reset "HEAD^"' alias gcs='git show' alias gcl='git-commit-lost' +# Conflict (C) +alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' +alias gCa='git add $(gCl)' +alias gCe='git mergetool $(gCl)' +alias gCo='git checkout --ours --' +alias gCO='gCo $(gCl)' +alias gCt='git checkout --theirs --' +alias gCT='gCt $(gCl)' + # Data (d) alias gd='git ls-files' alias gdc='git ls-files --cached' @@ -90,15 +99,6 @@ alias giR='git reset --patch' alias gix='git rm -r --cached' alias giX='git rm -rf --cached' -# Conflict (C) -alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' -alias gCa='git add $(gCl)' -alias gCe='git mergetool $(gCl)' -alias gCo='git checkout --ours --' -alias gCO='gCo $(gCl)' -alias gCt='git checkout --theirs --' -alias gCT='gCt $(gCl)' - # Log (l) alias gl='git log --topo-order --pretty=format:${_git_log_medium_format}' alias gls='git log --topo-order --stat --pretty=format:${_git_log_medium_format}' diff --git a/modules/helper/functions/add-zsh-trap b/modules/helper/functions/add-zsh-trap index e5d4e82c27..c8796ca0d5 100644 --- a/modules/helper/functions/add-zsh-trap +++ b/modules/helper/functions/add-zsh-trap @@ -6,14 +6,6 @@ # Sorin Ionescu # -# Trap signals were generated with 'kill -l'. -# DEBUG, EXIT, and ZERR are Zsh signals. -_trap_signals=( - ABRT ALRM BUS CHLD CONT EMT FPE HUP ILL INFO INT IO KILL PIPE PROF QUIT - SEGV STOP SYS TERM TRAP TSTP TTIN TTOU URG USR1 USR2 VTALRM WINCH XCPU XFSZ - DEBUG EXIT ZERR -) - # Adds a function name to a list to be called when a trap is triggered. function add-zsh-trap { if (( $# < 2 )); then @@ -21,7 +13,7 @@ function add-zsh-trap { return 1 fi - if [[ -z "$_trap_signals[(r)$1]" ]]; then + if [[ -z "$signals[(r)$1]" ]]; then print "$0: unknown signal: $1" >&2 return 1 fi diff --git a/modules/history-substring-search/external b/modules/history-substring-search/external index 04c2eca00c..82fbef5132 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit 04c2eca00c09f3351e72409923719c426f424160 +Subproject commit 82fbef5132b44c5d039e7d25972d9351c5936bc2 diff --git a/modules/osx/README.md b/modules/osx/README.md index bb74ef5518..498ed2e506 100644 --- a/modules/osx/README.md +++ b/modules/osx/README.md @@ -20,7 +20,6 @@ Functions - `pfd` prints the current _Finder_ directory. - `pfs` prints the current _Finder_ selection. - `tab` creates a new tab (works in both _Terminal_ and [_iTerm_][3]). - - `trash` moves files and folders to _Trash_. Authors ------- diff --git a/modules/osx/functions/trash b/modules/osx/functions/trash deleted file mode 100644 index d392437311..0000000000 --- a/modules/osx/functions/trash +++ /dev/null @@ -1,27 +0,0 @@ -# -# Moves directories and files to Trash. -# -# Authors: -# Sorin Ionescu -# - -print -N "${@:a}" | xargs -0 osascript -e ' - on run theFilePaths - tell application "Finder" - set thePOSIXFiles to {} - repeat with aFilePath in theFilePaths - set aPOSIXFile to aFilePath as POSIX file - if exists aPOSIXFile - set end of thePOSIXFiles to aPOSIXFile - end if - end repeat - move every item of thePOSIXFiles to trash - end tell - end run -' &>/dev/null - -if (( $? != 0)); then - print "$0: failed to move one or more items" >&2 - return 1 -fi - diff --git a/modules/prompt/README.md b/modules/prompt/README.md index 85ed13eef0..da3f2bac4c 100644 --- a/modules/prompt/README.md +++ b/modules/prompt/README.md @@ -34,7 +34,7 @@ including a function that displays help or a function used to preview it. **Do not call this function directly.** -The most basic example of this function can be seen bellow. +The most basic example of this function can be seen below. function prompt_name_setup { PROMPT='%m%# ' diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index a0862053f5..e5d8a50d36 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit a0862053f57e3d8d6e0dbc34e55be13d9e4fb668 +Subproject commit e5d8a50d362a153a28506be6fae9cf179dbb5fd4 diff --git a/modules/syntax-highlighting/init.zsh b/modules/syntax-highlighting/init.zsh index d9bd414bd1..0d360174c1 100644 --- a/modules/syntax-highlighting/init.zsh +++ b/modules/syntax-highlighting/init.zsh @@ -16,6 +16,6 @@ source "${0:h}/external/zsh-syntax-highlighting.zsh" # Set the highlighters. zstyle -a ':prezto:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS' if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then - ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets cursor) + ZSH_HIGHLIGHT_HIGHLIGHTERS=(main) fi diff --git a/runcoms/README.md b/runcoms/README.md index 28064ddcdb..74030b878c 100644 --- a/runcoms/README.md +++ b/runcoms/README.md @@ -38,7 +38,7 @@ small as possible and should only define environment variables. ### zprofile This file is similar to zlogin, but it is sourced before zshrc. It was added -for [KornShell][1] fans. See the description of zlogin bellow for what it may +for [KornShell][1] fans. See the description of zlogin below for what it may contain. zprofile and zlogin are not meant to be used concurrently but can be done so. diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 0766c65b52..62eb1ad3cb 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -110,7 +110,7 @@ zstyle ':prezto:module:ssh-agent' identities 'id_rsa' # # Set syntax highlighters. -# By default main, brackets, and cursor are enabled. +# By default, only the main highlighter is enabled. zstyle ':prezto:module:syntax-highlighting' color 'yes' # zstyle ':prezto:module:syntax-highlighting' highlighters \ # 'main' \ @@ -118,18 +118,3 @@ zstyle ':prezto:module:syntax-highlighting' color 'yes' # 'pattern' \ # 'cursor' \ # 'root' - -# -# Terminal -# - -# Auto set the tab and window titles. -zstyle ':prezto:module:terminal' auto-title 'yes' - -# -# Tmux -# - -# Auto start a session when Zsh is launched. -# zstyle ':prezto:module:tmux' auto-start 'yes' - diff --git a/runcoms/zshenv b/runcoms/zshenv index 64cf052bd8..13caa39c35 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -26,7 +26,7 @@ export PAGER='less' # if [[ -z "$LANG" ]]; then - eval "$(locale)" + export LANG='en_US.UTF-8' fi # diff --git a/runcoms/zshrc b/runcoms/zshrc index efaa093319..b9058db17d 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -27,3 +27,6 @@ alias my="mysql -u root -pmeh" # List all git aliases alias git_aliases="alias | ag --nocolor '^g.*git'" + +# Drush +alias dr='drush'