mirror of https://github.com/akelge/zsh
Cleanups
This commit is contained in:
parent
5f524d9757
commit
c5825d2137
|
@ -2,7 +2,7 @@
|
|||
# Variables
|
||||
|
||||
## Vars used always
|
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin:."
|
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin:."
|
||||
# LANG="it_IT.UTF-8"
|
||||
# TZ='Europe/Rome'
|
||||
MIBS=all
|
||||
|
|
|
@ -13,6 +13,9 @@ bindkey "^X^E" edit-command-line
|
|||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
|
||||
bindkey "^S" kill-line
|
||||
bindkey "^U" backward-kill-line
|
||||
|
||||
|
||||
# Useful under iTerm
|
||||
bindkey "-e"
|
||||
|
|
|
@ -18,7 +18,6 @@ PAGER=/usr/bin/less
|
|||
export LESS
|
||||
export PAGER
|
||||
|
||||
LESSPIPE=`whence -p lesspipe || whence -p lesspipe.sh`
|
||||
eval `$LESSPIPE`
|
||||
LESSOPEN="|lesspipe.sh %s"; export LESSOPEN
|
||||
|
||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
function venv {
|
||||
|
||||
# export WORKON_HOME=$HOME/Src/virtualenvs
|
||||
# export PROJECT_HOME=$HOME/Src/projects
|
||||
if [ -z $WORKON_HOME ] || [ -z $PROJECT_HOME ]; then
|
||||
echo "Please, set WORKON_HOME and PROJECT_HOME first."
|
||||
echo "Better place to set them is 99-local.zsh"
|
||||
return
|
||||
fi
|
||||
|
||||
[ -z $VIRTUALENV_SCRIPT ] && VIRTUALENV_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
|
||||
|
||||
[ -d $WORKON_HOME ] || mkdir -p $WORKON_HOME
|
||||
[ -d $PROJECT_HOME ] || mkdir -p $PROJECT_HOME
|
||||
|
||||
source $VIRTUALENV_SCRIPT
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "virtualenv enabled."
|
||||
echo "WORKON_HOME: $WORKON_HOME"
|
||||
echo "PROJECT_HOME: $PROJECT_HOME"
|
||||
echo
|
||||
echo "Virtualenvs:"
|
||||
lsvirtualenv -b
|
||||
echo
|
||||
else
|
||||
workon $1
|
||||
fi
|
||||
}
|
|
@ -165,7 +165,7 @@ prompt_mypure_preprompt_render() {
|
|||
fi
|
||||
|
||||
# Set the path.
|
||||
preprompt_parts+=('%F{${prompt_mypure_colors[path]}}%3.%f')
|
||||
preprompt_parts+=('%F{${prompt_mypure_colors[path]}}%~%f')
|
||||
|
||||
# Add Git branch and dirty status info.
|
||||
typeset -gA prompt_mypure_vcs_info
|
||||
|
|
|
@ -4,8 +4,8 @@ then
|
|||
echo AWS profile cleared.
|
||||
return
|
||||
fi
|
||||
saml2aws login -a $1 -p $1
|
||||
eval $(saml2aws script -a $1 -p $1 --skip-prompt)
|
||||
#saml2aws login -a $1 -p $1
|
||||
#eval $(saml2aws script -a $1 -p $1 --skip-prompt)
|
||||
export AWS_DEFAULT_PROFILE=$1
|
||||
export AWS_PROFILE=$1
|
||||
export AWS_EB_PROFILE=$1
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
fancyterms=('xterm' 'rxvt' 'screen')
|
||||
|
||||
for t in $fancyterms; do
|
||||
if [ "${TERM#${t}}" != "$TERM" ]; then
|
||||
unset fancyterms
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
unset fancyterms
|
||||
return 1
|
||||
|
||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
Binary file not shown.
|
@ -1,17 +0,0 @@
|
|||
du -kc $* | sort -nr | awk '{
|
||||
# Prepare human readable
|
||||
if($1>=1024*1024) { size=$1/1024/1024; unit="G" }
|
||||
else if($1>=1024) { size=$1/1024; unit="M" }
|
||||
else { size=$1; unit="K" };
|
||||
format="%10.2f%s";
|
||||
hsize=sprintf(format,size,unit);
|
||||
|
||||
# Remove $1 (size), then removes " " at the start of $0
|
||||
$1=""; thepath=$0; sub(/^ /,"",thepath);
|
||||
|
||||
# Print size and path (directories are bolded)
|
||||
if ( system("[ -d \""thepath"\" ]") )
|
||||
printf "%-8s %s\n",hsize,thepath;
|
||||
else
|
||||
printf "%-8s \033[1m%s\033[0m/\n",hsize,thepath;
|
||||
}'
|
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
grep -i $* $HISTFILE
|
Binary file not shown.
|
@ -1,8 +0,0 @@
|
|||
function repo_char {
|
||||
#git branch > /dev/null 2> /dev/null && echo '±:' && return
|
||||
git branch > /dev/null 2> /dev/null && echo '\u00b1:' && return
|
||||
svn info > /dev/null 2> /dev/null && echo '\u13a6:' && return
|
||||
# git branch > /dev/null 2> /dev/null && echo 'git:' && return
|
||||
# svn info > /dev/null 2> /dev/null && echo 'svn:' && return
|
||||
# echo '\u25cb'
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue