From f363c025daa1dbf684f80ab7e29d34dbd5fb9d89 Mon Sep 17 00:00:00 2001 From: James Cox Date: Wed, 23 Sep 2009 16:14:43 +0100 Subject: put everything in lib --- correction.zsh | 6 ------ directories.zsh | 40 ---------------------------------------- lib/correction.zsh | 6 ++++++ lib/directories.zsh | 40 ++++++++++++++++++++++++++++++++++++++++ lib/misc.zsh | 9 +++++++++ lib/termsupport.zsh | 21 +++++++++++++++++++++ misc.zsh | 9 --------- xterms.zsh | 21 --------------------- 8 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 correction.zsh delete mode 100644 directories.zsh create mode 100644 lib/correction.zsh create mode 100644 lib/directories.zsh create mode 100644 lib/misc.zsh create mode 100644 lib/termsupport.zsh delete mode 100644 misc.zsh delete mode 100644 xterms.zsh diff --git a/correction.zsh b/correction.zsh deleted file mode 100644 index c9fecb0fe..000000000 --- a/correction.zsh +++ /dev/null @@ -1,6 +0,0 @@ -setopt correct_all - -alias man='nocorrect man' -alias mv='nocorrect mv' -alias mysql='nocorrect mysql' -alias mv='nocorrect mv' diff --git a/directories.zsh b/directories.zsh deleted file mode 100644 index 56d7a2316..000000000 --- a/directories.zsh +++ /dev/null @@ -1,40 +0,0 @@ -# Changing/making/removing directory -setopt auto_name_dirs -setopt auto_pushd -setopt pushd_ignore_dups - -alias ..='cd ..' -alias cd..='cd ..' -alias cd...='cd ../..' -alias cd....='cd ../../..' -alias cd.....='cd ../../../..' -alias cd/='cd /' - -alias 1='cd -' -alias 2='cd +2' -alias 3='cd +3' -alias 4='cd +4' -alias 5='cd +5' -alias 6='cd +6' -alias 7='cd +7' -alias 8='cd +8' -alias 9='cd +9' - -cd () { - if [[ "x$*" == "x..." ]]; then - cd ../.. - elif [[ "x$*" == "x...." ]]; then - cd ../../.. - elif [[ "x$*" == "x....." ]]; then - cd ../../.. - elif [[ "x$*" == "x......" ]]; then - cd ../../../.. - else - builtin cd "$@" - fi -} - -alias md='mkdir -p' -alias rd=rmdir - -alias d='dirs -v' \ No newline at end of file diff --git a/lib/correction.zsh b/lib/correction.zsh new file mode 100644 index 000000000..c9fecb0fe --- /dev/null +++ b/lib/correction.zsh @@ -0,0 +1,6 @@ +setopt correct_all + +alias man='nocorrect man' +alias mv='nocorrect mv' +alias mysql='nocorrect mysql' +alias mv='nocorrect mv' diff --git a/lib/directories.zsh b/lib/directories.zsh new file mode 100644 index 000000000..56d7a2316 --- /dev/null +++ b/lib/directories.zsh @@ -0,0 +1,40 @@ +# Changing/making/removing directory +setopt auto_name_dirs +setopt auto_pushd +setopt pushd_ignore_dups + +alias ..='cd ..' +alias cd..='cd ..' +alias cd...='cd ../..' +alias cd....='cd ../../..' +alias cd.....='cd ../../../..' +alias cd/='cd /' + +alias 1='cd -' +alias 2='cd +2' +alias 3='cd +3' +alias 4='cd +4' +alias 5='cd +5' +alias 6='cd +6' +alias 7='cd +7' +alias 8='cd +8' +alias 9='cd +9' + +cd () { + if [[ "x$*" == "x..." ]]; then + cd ../.. + elif [[ "x$*" == "x...." ]]; then + cd ../../.. + elif [[ "x$*" == "x....." ]]; then + cd ../../.. + elif [[ "x$*" == "x......" ]]; then + cd ../../../.. + else + builtin cd "$@" + fi +} + +alias md='mkdir -p' +alias rd=rmdir + +alias d='dirs -v' \ No newline at end of file diff --git a/lib/misc.zsh b/lib/misc.zsh new file mode 100644 index 000000000..fab4be931 --- /dev/null +++ b/lib/misc.zsh @@ -0,0 +1,9 @@ +## smart urls +autoload -U url-quote-magic +zle -N self-insert url-quote-magic + +## file rename magick +bindkey "^[m" copy-prev-shell-word + +## jobs +setopt long_list_jobs \ No newline at end of file diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh new file mode 100644 index 000000000..fef978748 --- /dev/null +++ b/lib/termsupport.zsh @@ -0,0 +1,21 @@ +case "$TERM" in + xterm*|rxvt*) + preexec () { + print -Pn "\e]0;%n@%m: $1\a" # xterm + } + precmd () { + print -Pn "\e]0;%n@%m: %~\a" # xterm + } + ;; + screen*) + preexec () { + local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} + echo -ne "\ek$CMD\e\\" + print -Pn "\e]0;%n@%m: $1\a" # xterm + } + precmd () { + echo -ne "\ekzsh\e\\" + print -Pn "\e]0;%n@%m: %~\a" # xterm + } + ;; +esac \ No newline at end of file diff --git a/misc.zsh b/misc.zsh deleted file mode 100644 index fab4be931..000000000 --- a/misc.zsh +++ /dev/null @@ -1,9 +0,0 @@ -## smart urls -autoload -U url-quote-magic -zle -N self-insert url-quote-magic - -## file rename magick -bindkey "^[m" copy-prev-shell-word - -## jobs -setopt long_list_jobs \ No newline at end of file diff --git a/xterms.zsh b/xterms.zsh deleted file mode 100644 index fef978748..000000000 --- a/xterms.zsh +++ /dev/null @@ -1,21 +0,0 @@ -case "$TERM" in - xterm*|rxvt*) - preexec () { - print -Pn "\e]0;%n@%m: $1\a" # xterm - } - precmd () { - print -Pn "\e]0;%n@%m: %~\a" # xterm - } - ;; - screen*) - preexec () { - local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} - echo -ne "\ek$CMD\e\\" - print -Pn "\e]0;%n@%m: $1\a" # xterm - } - precmd () { - echo -ne "\ekzsh\e\\" - print -Pn "\e]0;%n@%m: %~\a" # xterm - } - ;; -esac \ No newline at end of file -- cgit v1.2.3-70-g09d2