aboutsummaryrefslogtreecommitdiffstats
path: root/_zsh
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-02-03 14:20:27 +0800
committerAaron LI <aaronly.me@gmail.com>2016-02-03 14:20:27 +0800
commit20bda32d5ec8393fe28422d453207fa261a4b09a (patch)
treebfd5af429fdf7628facd4e27bed8c48b40f64c70 /_zsh
parent5e57793ecbdcf544931f6f5dc875f91b47ad9f0e (diff)
downloaddotfiles-20bda32d5ec8393fe28422d453207fa261a4b09a.tar.bz2
Tune zsh configuations
Diffstat (limited to '_zsh')
-rw-r--r--_zsh/aliases.zsh2
-rw-r--r--_zsh/bindkeys.zsh5
-rw-r--r--_zsh/history.zsh4
-rw-r--r--_zsh/hooks.zsh32
-rw-r--r--_zsh/setopt.zsh7
5 files changed, 35 insertions, 15 deletions
diff --git a/_zsh/aliases.zsh b/_zsh/aliases.zsh
index 7b1b26f..ccf8f17 100644
--- a/_zsh/aliases.zsh
+++ b/_zsh/aliases.zsh
@@ -2,6 +2,8 @@
# zsh/aliases.zsh
#
+alias zhelp='run-help'
+
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
diff --git a/_zsh/bindkeys.zsh b/_zsh/bindkeys.zsh
index 07ca090..c53d3bf 100644
--- a/_zsh/bindkeys.zsh
+++ b/_zsh/bindkeys.zsh
@@ -16,4 +16,9 @@ bindkey "^D" delete-char # ctrl-d
bindkey "^F" forward-char # ctrl-f
bindkey "^B" backward-char # ctrl-b
+# see zshcontrib(1)
+autoload -U select-word-style
+# bash-style word killing: word characters are alphanumeric characters only
+select-word-style bash
+
# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
diff --git a/_zsh/history.zsh b/_zsh/history.zsh
index bfa6317..e1275a6 100644
--- a/_zsh/history.zsh
+++ b/_zsh/history.zsh
@@ -4,8 +4,8 @@
HISTFILE=~/.zsh_history
-HISTSIZE=2000
-SAVEHIST=1800
+HISTSIZE=10000
+SAVEHIST=9000
# ignore these commands without arguments
HISTIGNORE="cd:ls:ll"
diff --git a/_zsh/hooks.zsh b/_zsh/hooks.zsh
index 9e18053..defee0b 100644
--- a/_zsh/hooks.zsh
+++ b/_zsh/hooks.zsh
@@ -2,27 +2,33 @@
# zsh/hooks.zsh
#
-function precmd {
- # vcs_info
- # Put the string "hostname::/full/directory/path" in the title bar:
+# Put the string "hostname::/full/directory/path" in the title bar:
+function set_term_title {
echo -ne "\e]2;$PWD\a"
+}
- # Put the parentdir/currentdir in the tab
+# Put the parentdir/currentdir in the tab
+function set_term_tab {
echo -ne "\e]1;$PWD:h:t/$PWD:t\a"
}
-
-function set_running_app {
- printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a"
+function precmd {
+ set_term_title
+ set_term_tab
}
-function preexec {
- set_running_app
-}
-function postexec {
- set_running_app
-}
+#function set_running_app {
+# printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a"
+#}
+#
+#function preexec {
+# set_running_app
+#}
+#
+#function postexec {
+# set_running_app
+#}
# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
diff --git a/_zsh/setopt.zsh b/_zsh/setopt.zsh
index 79a1832..fb8b5e8 100644
--- a/_zsh/setopt.zsh
+++ b/_zsh/setopt.zsh
@@ -1,16 +1,21 @@
#
# zsh/setopt.zsh
+# see man zshoptions(1)
#
## Basics
setopt NO_BEEP
setopt AUTO_CD
+# make cd push the old directory onto the directory stack
+setopt AUTO_PUSHD
# don't push multiple copies of the same directory into the directory stack
setopt PUSHD_IGNORE_DUPS
# treat #, ~, and ^ as part of patterns for filename generation
setopt EXTENDED_GLOB
# allow comments even in interactive shells (especially for Muness)
setopt INTERACTIVE_COMMENTS
+# display PID when suspending processes as well
+setopt LONG_LIST_JOBS
## History
# allow multiple terminal sessions to all append to one zsh command history
@@ -32,6 +37,8 @@ setopt HIST_VERIFY
## Completion
+# * shouldn't match dotfiles. ever.
+setopt NO_GLOB_DOTS
# allow completion from within a word/phrase
setopt COMPLETE_IN_WORD
# when completing from middle of a word, move cursor to the end of the word