mirror of https://github.com/akelge/vim
Modified Processing of source files
Changed prompts Added 99-local autocreation
This commit is contained in:
parent
206f88890b
commit
81b5f4c020
|
@ -26,4 +26,12 @@ alias soa='host -t soa'
|
||||||
alias ptr='host -t ptr'
|
alias ptr='host -t ptr'
|
||||||
|
|
||||||
alias vi="vim "
|
alias vi="vim "
|
||||||
|
|
||||||
|
# Global Aliases
|
||||||
|
#
|
||||||
|
alias -g L="|less"
|
||||||
|
alias -g NO="> /dev/null"
|
||||||
|
alias -g NE="2> /dev/null"
|
||||||
|
alias -g NA="> /dev/null 2>&1"
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
||||||
|
|
|
@ -1,29 +1,5 @@
|
||||||
#######################################################################################
|
fpath=(`dirname $0`/prompts $fpath)
|
||||||
|
|
||||||
# prompt_akel_setup() {
|
|
||||||
# precmd () {
|
|
||||||
|
|
||||||
# # Setup PROMPT
|
|
||||||
# if [ ${TERM[0,5]} = "xterm" ] || [ ${TERM} = "rxvt" ]; then
|
|
||||||
# # We are on xterminal
|
|
||||||
# W="%{]2;::: %n at %m in %. :::%}"
|
|
||||||
# I="%{]1;%m::%.%}"
|
|
||||||
# L="%B%K{blue}%F{white}@%m::%2~ %f%k
|
|
||||||
# %F{yellow}%#%f%b "
|
|
||||||
# PS1="$W$I$L"
|
|
||||||
# unset W I L
|
|
||||||
|
|
||||||
# else
|
|
||||||
# # We are not on xterminal
|
|
||||||
# PS1="%B[%l] %n@%m:%~ %#%b "
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# preexec () { }
|
|
||||||
|
|
||||||
# }
|
|
||||||
|
|
||||||
# prompt_akel_setup
|
|
||||||
autoload -U promptinit;promptinit
|
autoload -U promptinit;promptinit
|
||||||
prompt akel1
|
|
||||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
function prompt_minimal_setup {
|
||||||
|
# Setup PROMPT
|
||||||
|
if [ ${TERM[0,5]} = "xterm" ] || [ ${TERM} = "rxvt" ]; then
|
||||||
|
# We are on xterminal
|
||||||
|
W="%n@%m:%."
|
||||||
|
I="%m:%."
|
||||||
|
L="%B%. %#%b "
|
||||||
|
PS1="%{]2;$W%}%{]1;$I%}$L"
|
||||||
|
unset W I L
|
||||||
|
|
||||||
|
else
|
||||||
|
# We are not on xterminal
|
||||||
|
PS1="%B%. %#%b "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_minimal_setup
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
|
@ -0,0 +1,19 @@
|
||||||
|
function prompt_nice_setup {
|
||||||
|
|
||||||
|
if [ ${TERM[0,5]} = "xterm" ] || [ ${TERM} = "rxvt" ]; then
|
||||||
|
W="::: %n at %m in %. :::"
|
||||||
|
I="%m::%."
|
||||||
|
L="%B%K{blue}%F{white}@%m::%2~ %f%k
|
||||||
|
%F{yellow}%#%f%b "
|
||||||
|
PS1="%{]2;$W%}%{]1;$I%}$L"
|
||||||
|
unset W I L
|
||||||
|
|
||||||
|
else
|
||||||
|
# We are not on xterminal
|
||||||
|
PS1="%B%K{blue}%F{white}[%l] %n@%m:%~ %f%k%F{yellow}%#%f%b "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_nice_setup
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
|
@ -1,13 +1,11 @@
|
||||||
function prompt_akel1_setup {
|
function prompt_plain_setup {
|
||||||
|
|
||||||
# Setup PROMPT
|
# Setup PROMPT
|
||||||
if [ ${TERM[0,5]} = "xterm" ] || [ ${TERM} = "rxvt" ]; then
|
if [ ${TERM[0,5]} = "xterm" ] || [ ${TERM} = "rxvt" ]; then
|
||||||
# We are on xterminal
|
# We are on xterminal
|
||||||
W="%{]2;::: %n at %m in %. :::%}"
|
W="%n@%m:%."
|
||||||
I="%{]1;%m::%.%}"
|
I="%m:%."
|
||||||
L="%B%K{blue}%F{white}@%m::%2~ %f%k
|
L="%B[%l] %~ %#%b "
|
||||||
%F{yellow}%#%f%b "
|
PS1="%{]2;$W%}%{]1;$I%}$L"
|
||||||
PS1="$W$I$L"
|
|
||||||
unset W I L
|
unset W I L
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -16,4 +14,6 @@ else
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_akel1_setup
|
prompt_plain_setup
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
21
zsh/zshrc
21
zsh/zshrc
|
@ -6,21 +6,28 @@
|
||||||
#
|
#
|
||||||
# Global Order: zshenv, zprofile, zshrc, zlogin
|
# Global Order: zshenv, zprofile, zshrc, zlogin
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc
|
||||||
|
[ -d /etc/zsh ] && BASE="/etc/zsh" || BASE="/etc"
|
||||||
|
|
||||||
KERNEL=`uname -s`
|
KERNEL=`uname -s`
|
||||||
LIBRARY="/etc/zsh.d"
|
LIBRARY=${BASE}/zsh.d
|
||||||
KERNLIB="${LIBRARY}/${KERNEL}"
|
KERNLIB=${LIBRARY}/${KERNEL}
|
||||||
|
|
||||||
function loadRC {
|
function loadRC {
|
||||||
|
# [ -d $1 ] && cd $1 || exit 1
|
||||||
|
|
||||||
if [ -d $1/zshfunctions ]; then
|
if [ -d $1/zshfunctions ]; then
|
||||||
fpath=($1/zshfunctions $fpath)
|
fpath=($1/zshfunctions $fpath)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $1 ]; then
|
# Add local customization file, svn ignored
|
||||||
# for zshFile in $1/*[^~]; do
|
[ -f $1/99-local ] || echo "# Local customizations" > $1/99-local
|
||||||
for zshFile in $1/*[^off\|~]; do
|
|
||||||
|
for zshFile in $1/[0-9]*[^off\|~]; do
|
||||||
. $zshFile
|
. $zshFile
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
unset zshFile
|
unset zshFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +39,7 @@ unset LIBRARY
|
||||||
unset KERNLIB
|
unset KERNLIB
|
||||||
|
|
||||||
# Local (per Host) customizations
|
# Local (per Host) customizations
|
||||||
for localDir in /etc/zsh /etc /usr/local/etc /usr/local/etc/zsh; do
|
for localDir in ${LIBRARY} /etc/zsh /etc /usr/local/etc /usr/local/etc/zsh; do
|
||||||
if [ -f ${localDir}/zshrc.local ]; then
|
if [ -f ${localDir}/zshrc.local ]; then
|
||||||
. ${localDir}/zshrc.local
|
. ${localDir}/zshrc.local
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue