aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorMatt Singleton <matthew.j.singleton@gmail.com>2011-02-19 03:23:36 -0500
committerMatt Singleton <matthew.j.singleton@gmail.com>2011-02-19 03:23:36 -0500
commite23970ffeba636b9fe42b48bd7a33e36371feb22 (patch)
treee54fbbd61b2f78f0710e7cfc6201ac0626ff04a0 /zsh
parent58c6df5b3b0f397a535746ecda0e6d7fe70516da (diff)
consolidating behavior to behavior.zsh
Diffstat (limited to 'zsh')
-rw-r--r--zsh/behavior.zsh54
-rw-r--r--zsh/correction.zsh9
-rw-r--r--zsh/history.zsh10
-rw-r--r--zsh/termsupport.zsh23
4 files changed, 54 insertions, 42 deletions
diff --git a/zsh/behavior.zsh b/zsh/behavior.zsh
new file mode 100644
index 0000000..fad9161
--- /dev/null
+++ b/zsh/behavior.zsh
@@ -0,0 +1,54 @@
+# TODO: incorporate completion
+
+#
+# execution
+
+setopt rm_star_wait # wait 10 seconds before accepting 'rm *' confirmation
+export REPORTTIME=5 # report timing for any command longer than 5 seconds
+
+#
+# correction
+
+setopt correct_all
+
+alias man='nocorrect man'
+alias mv='nocorrect mv'
+alias mysql='nocorrect mysql'
+alias psql='nocorrect psql'
+alias mkdir='nocorrect mkdir'
+
+#
+# history
+
+HISTFILE=$HOME/.zsh_history
+HISTSIZE=10000
+SAVEHIST=10000
+
+setopt hist_ignore_all_dups # ignore dups including non-sequential ones
+setopt share_history # share command history data between sessions
+setopt hist_verify # load hist into command buffer rather than exec immediately
+
+#
+# term support
+
+case "$TERM" in
+ xterm*|rxvt*)
+ term_preexec () {
+ print -Pn "\e]0;%n@%m:%~ ($1)\a" # xterm
+ }
+ term_precmd () {
+ print -Pn "\e]0;%n@%m:%~\a" # xterm
+ }
+ ;;
+ screen*)
+ term_preexec () {
+ local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
+ echo -ne "\ek$CMD\e\\"
+ print -Pn "\e]0;%n@%m:%~($1)\a" # xterm
+ }
+ term_precmd () {
+ echo -ne "\ekzsh\e\\"
+ print -Pn "\e]0;%n@%m:%~\a" # xterm
+ }
+ ;;
+esac
diff --git a/zsh/correction.zsh b/zsh/correction.zsh
deleted file mode 100644
index 72692a6..0000000
--- a/zsh/correction.zsh
+++ /dev/null
@@ -1,9 +0,0 @@
-#done
-
-setopt correct_all
-
-alias man='nocorrect man'
-alias mv='nocorrect mv'
-alias mysql='nocorrect mysql'
-alias psql='nocorrect psql'
-alias mkdir='nocorrect mkdir'
diff --git a/zsh/history.zsh b/zsh/history.zsh
deleted file mode 100644
index 4f46d2f..0000000
--- a/zsh/history.zsh
+++ /dev/null
@@ -1,10 +0,0 @@
-#done
-
-## Command history configuration
-HISTFILE=$HOME/.zsh_history
-HISTSIZE=10000
-SAVEHIST=10000
-
-setopt hist_ignore_all_dups # ignore dups including non-sequential ones
-setopt share_history # share command history data between sessions
-setopt hist_verify # load hist into command buffer rather than exec immediately
diff --git a/zsh/termsupport.zsh b/zsh/termsupport.zsh
deleted file mode 100644
index 6768222..0000000
--- a/zsh/termsupport.zsh
+++ /dev/null
@@ -1,23 +0,0 @@
-#done
-
-case "$TERM" in
- xterm*|rxvt*)
- term_preexec () {
- print -Pn "\e]0;%n@%m:%~ ($1)\a" # xterm
- }
- term_precmd () {
- print -Pn "\e]0;%n@%m:%~\a" # xterm
- }
- ;;
- screen*)
- term_preexec () {
- local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
- echo -ne "\ek$CMD\e\\"
- print -Pn "\e]0;%n@%m:%~($1)\a" # xterm
- }
- term_precmd () {
- echo -ne "\ekzsh\e\\"
- print -Pn "\e]0;%n@%m:%~\a" # xterm
- }
- ;;
-esac