From 5de20407af1e3f1cfdabec546b0ecbf697d29465 Mon Sep 17 00:00:00 2001 From: pztrn Date: Thu, 12 Mar 2015 20:09:24 +0500 Subject: [PATCH] - EDITOR variable export fixed. - Aliases now can be loaded from "aliases" directory, both in $HOME and in sources tree. - Some useful aliases for Arch Linux added. --- zsh/50-aliases.zsh | 10 ++++++++++ zsh/aliases/10-arch.conf | 8 ++++++++ zsh/defaults/aliases/.gitkeep | 0 zsh/exports/10-editor.zsh | 2 +- zsh/prompts/pztrn.zsh | 2 +- 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 zsh/aliases/10-arch.conf create mode 100644 zsh/defaults/aliases/.gitkeep diff --git a/zsh/50-aliases.zsh b/zsh/50-aliases.zsh index 87a9e71..2a4aac3 100644 --- a/zsh/50-aliases.zsh +++ b/zsh/50-aliases.zsh @@ -6,3 +6,13 @@ alias screen="TERM=xterm screen" # Other alias clocksync="sudo ntpdate 0.pool.ntp.org" alias got="git" + +for item in `ls ${CONFIG_PATH}/zsh/aliases`; do + source ${CONFIG_PATH}/zsh/aliases/${item} +done + +if [ -d "${HOME}/.zsh-config.d/aliases" ]; then + for item in `ls ${HOME}/.zsh-config.d/aliases`; do + source ${HOME}/.zsh-config.d/aliases/${item} + done +fi diff --git a/zsh/aliases/10-arch.conf b/zsh/aliases/10-arch.conf new file mode 100644 index 0000000..a03b99a --- /dev/null +++ b/zsh/aliases/10-arch.conf @@ -0,0 +1,8 @@ +# Some good default aliases for Arch Linux. + +if [ "${OS_RELEASE/ARCH}" != "${OS_RELEASE}" ]; then + alias yasearch="yaourt -Ss" + alias yadel="yaourt -Rddd" + alias yainstall="yaourt -S" + alias sysupdate="yaourt -Syua" +fi diff --git a/zsh/defaults/aliases/.gitkeep b/zsh/defaults/aliases/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/zsh/exports/10-editor.zsh b/zsh/exports/10-editor.zsh index 7edb340..4a8a940 100644 --- a/zsh/exports/10-editor.zsh +++ b/zsh/exports/10-editor.zsh @@ -1,2 +1,2 @@ # This file is used to override EDITOR variable. -EDITOR="nano" \ No newline at end of file +export EDITOR="nano" diff --git a/zsh/prompts/pztrn.zsh b/zsh/prompts/pztrn.zsh index bc24384..b587fce 100644 --- a/zsh/prompts/pztrn.zsh +++ b/zsh/prompts/pztrn.zsh @@ -65,4 +65,4 @@ $vars['console']$p_path $p_end" } -prompt_pztrn_setup "$@" +prompt_pztrn_setup