some comments
This commit is contained in:
parent
2975bfafd4
commit
d3a36b992b
15
.zshrc
15
.zshrc
@ -22,8 +22,9 @@ GEAR="\u2699"
|
|||||||
BULLET="\u2022"
|
BULLET="\u2022"
|
||||||
CROSSING="\u292c"
|
CROSSING="\u292c"
|
||||||
|
|
||||||
#--- Helpers
|
#---------------------------------- Helpers -----------------------------------
|
||||||
|
|
||||||
|
# Search file up in directory tree
|
||||||
find_up () {
|
find_up () {
|
||||||
path=$(pwd)
|
path=$(pwd)
|
||||||
while [[ "$path" != "" ]]; do
|
while [[ "$path" != "" ]]; do
|
||||||
@ -37,6 +38,9 @@ find_up () {
|
|||||||
|
|
||||||
#---------------------------------- Tab completion ----------------------------
|
#---------------------------------- Tab completion ----------------------------
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
# Force a reload of completion system if nothing matched; this fixes installing
|
# Force a reload of completion system if nothing matched; this fixes installing
|
||||||
# a program and then trying to tab-complete its name
|
# a program and then trying to tab-complete its name
|
||||||
_force_rehash() {
|
_force_rehash() {
|
||||||
@ -74,9 +78,6 @@ zstyle :compinstall filename "$HOME/.zshrc"
|
|||||||
# Always do mid-word tab completion
|
# Always do mid-word tab completion
|
||||||
setopt complete_in_word
|
setopt complete_in_word
|
||||||
|
|
||||||
autoload -Uz compinit
|
|
||||||
compinit
|
|
||||||
|
|
||||||
#---------------------------------- History -----------------------------------
|
#---------------------------------- History -----------------------------------
|
||||||
|
|
||||||
setopt extended_history
|
setopt extended_history
|
||||||
@ -381,9 +382,11 @@ bindkey "\e[B" down-line-or-local-history
|
|||||||
|
|
||||||
#---------------------------------- Aliases ----------------------------------
|
#---------------------------------- Aliases ----------------------------------
|
||||||
|
|
||||||
|
# Use interactive sudo instead of su
|
||||||
alias su="sudo -u root -i"
|
alias su="sudo -u root -i"
|
||||||
|
|
||||||
#---------------------------------- Maven ------------------------------------
|
#---------------------------------- Maven ------------------------------------
|
||||||
|
# Coloring maven output
|
||||||
# based on https://gist.github.com/katta/1027800
|
# based on https://gist.github.com/katta/1027800
|
||||||
|
|
||||||
mvn-color()
|
mvn-color()
|
||||||
@ -406,7 +409,7 @@ mvn-color()
|
|||||||
}
|
}
|
||||||
alias mvn='mvn-color'
|
alias mvn='mvn-color'
|
||||||
|
|
||||||
# Read project into current directory
|
# Read project information from current directory - needed for prompt
|
||||||
|
|
||||||
maven_read_project() {
|
maven_read_project() {
|
||||||
local location parts
|
local location parts
|
||||||
@ -453,6 +456,8 @@ store_last_return_value() {
|
|||||||
LAST_RETURN_VALUE="$?"
|
LAST_RETURN_VALUE="$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Store last return value into separate variable
|
||||||
|
# This must be exactly first precmd function, because other precmd might modify $?
|
||||||
precmd_functions=(store_last_return_value $precmd_functions)
|
precmd_functions=(store_last_return_value $precmd_functions)
|
||||||
|
|
||||||
#---------------------------------- Machine specific --------------------------
|
#---------------------------------- Machine specific --------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user