From c5825d2137df427bcbd1f423b6c55b983e04887d Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Mon, 9 Aug 2021 16:03:13 +0200 Subject: [PATCH] Cleanups --- zsh.d/10-environment.zsh | 2 +- zsh.d/20-bindkeys.zsh | 3 +++ zsh.d/30-less.zsh | 3 +-- zsh.d/90-virtualenv.zsh | 29 ----------------------------- zsh.d/prompts/mypure/mypure.zsh | 2 +- zsh.d/zshfunctions/awslogin | 4 ++-- zsh.d/zshfunctions/fancyTerm | 13 ------------- zsh.d/zshfunctions/fancyTerm.zwc | Bin 784 -> 0 bytes zsh.d/zshfunctions/hdu | 17 ----------------- zsh.d/zshfunctions/hdu.zwc | Bin 1416 -> 0 bytes zsh.d/zshfunctions/hist | 1 - zsh.d/zshfunctions/hist.zwc | Bin 288 -> 0 bytes zsh.d/zshfunctions/repo_char | 8 -------- zsh.d/zshfunctions/repo_char.zwc | Bin 704 -> 0 bytes 14 files changed, 8 insertions(+), 74 deletions(-) delete mode 100644 zsh.d/90-virtualenv.zsh delete mode 100644 zsh.d/zshfunctions/fancyTerm delete mode 100644 zsh.d/zshfunctions/fancyTerm.zwc delete mode 100644 zsh.d/zshfunctions/hdu delete mode 100644 zsh.d/zshfunctions/hdu.zwc delete mode 100644 zsh.d/zshfunctions/hist delete mode 100644 zsh.d/zshfunctions/hist.zwc delete mode 100644 zsh.d/zshfunctions/repo_char delete mode 100644 zsh.d/zshfunctions/repo_char.zwc diff --git a/zsh.d/10-environment.zsh b/zsh.d/10-environment.zsh index e2e6e6d..c1f911e 100644 --- a/zsh.d/10-environment.zsh +++ b/zsh.d/10-environment.zsh @@ -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 diff --git a/zsh.d/20-bindkeys.zsh b/zsh.d/20-bindkeys.zsh index ed3ff18..87d5485 100644 --- a/zsh.d/20-bindkeys.zsh +++ b/zsh.d/20-bindkeys.zsh @@ -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" diff --git a/zsh.d/30-less.zsh b/zsh.d/30-less.zsh index d35de3e..15757c6 100644 --- a/zsh.d/30-less.zsh +++ b/zsh.d/30-less.zsh @@ -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 : diff --git a/zsh.d/90-virtualenv.zsh b/zsh.d/90-virtualenv.zsh deleted file mode 100644 index e874c69..0000000 --- a/zsh.d/90-virtualenv.zsh +++ /dev/null @@ -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 -} diff --git a/zsh.d/prompts/mypure/mypure.zsh b/zsh.d/prompts/mypure/mypure.zsh index d4ca73b..9c9ad4c 100644 --- a/zsh.d/prompts/mypure/mypure.zsh +++ b/zsh.d/prompts/mypure/mypure.zsh @@ -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 diff --git a/zsh.d/zshfunctions/awslogin b/zsh.d/zshfunctions/awslogin index 2bff1a5..7c71c74 100644 --- a/zsh.d/zshfunctions/awslogin +++ b/zsh.d/zshfunctions/awslogin @@ -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 diff --git a/zsh.d/zshfunctions/fancyTerm b/zsh.d/zshfunctions/fancyTerm deleted file mode 100644 index 8df1ad6..0000000 --- a/zsh.d/zshfunctions/fancyTerm +++ /dev/null @@ -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 : diff --git a/zsh.d/zshfunctions/fancyTerm.zwc b/zsh.d/zshfunctions/fancyTerm.zwc deleted file mode 100644 index 0c1d3e54465c2cf6e3dcc20f3d942fd5eaa81d2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 784 zcmcIhJ!=9%5Pi3|D$&Ag1PfE8l!!#~0}e?#n_y#SkPD>96?bPa*oYDc2io72f~oxj zR{jzHM!LM&yL=FYkRk)an|d)jks%wWFnX# z2_}ybAshvs=O=jnrb**v|LUf97B8dKDn%O0DaF_iy$FF9jRPO2x=<{sKls3B&Z=Oo!_=xS3dCZ43h(v0_Gz#Z9YCYPhAn&JeUhamG;kUH&wGs=UoOnJb)F zp{K+h^ngx@6`J?S*E*t+nqO$ui42)%_&pE8x0!R+Ij=tWA9``(Qy;Vb7a!gM$r*88 diff --git a/zsh.d/zshfunctions/hdu b/zsh.d/zshfunctions/hdu deleted file mode 100644 index 325fd90..0000000 --- a/zsh.d/zshfunctions/hdu +++ /dev/null @@ -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; -}' diff --git a/zsh.d/zshfunctions/hdu.zwc b/zsh.d/zshfunctions/hdu.zwc deleted file mode 100644 index 62e388455e24f0710b69db2ee5526a7a13e24a80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1416 zcmeHFO>5jR5EZsJ3%-_~av4-F*o~95lNJhI7jj7pr4V`xyDfNY8GBjV8%vweE;;ol zV2%SbY>@Z;O%S1}-&KuDYsGg>QmF z!a_EMI>B$cRrK84*J zW}Npa`HaJR9)O9YhL{%uAML)7Fp{%|hx+YzmoV+1U!s%$Mwvwi2h+GlCM}|R{D%w| zSByD>t)cZF8b*nsjIDDmHpcE{Od3Y~kg*9V{JV_p8*Xo(ESNLd>G69R+n1*c#I%g< U>8*=vE#n6bKWLa_|F0VU2B7XwN&o-= diff --git a/zsh.d/zshfunctions/hist b/zsh.d/zshfunctions/hist deleted file mode 100644 index 27e1b20..0000000 --- a/zsh.d/zshfunctions/hist +++ /dev/null @@ -1 +0,0 @@ -grep -i $* $HISTFILE diff --git a/zsh.d/zshfunctions/hist.zwc b/zsh.d/zshfunctions/hist.zwc deleted file mode 100644 index a82075dfe8e9e4f00da27976ae1b789bdfdeda33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmZQ)V`X8Oz`$UtXP{@qKp2Psl{i3^X#i;sC_5vwxP$>H>Bz*uz$C-K&Mk28XzL`nWQ%u(Gi;k>DPnaaf%Mb`RJt bCPxMa8KA4soW$&z#lT{t4HO4E372~S@xUCT diff --git a/zsh.d/zshfunctions/repo_char b/zsh.d/zshfunctions/repo_char deleted file mode 100644 index 6adbcef..0000000 --- a/zsh.d/zshfunctions/repo_char +++ /dev/null @@ -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' -} diff --git a/zsh.d/zshfunctions/repo_char.zwc b/zsh.d/zshfunctions/repo_char.zwc deleted file mode 100644 index cfa97ff60480bc9b5f160affa5448a8db6c58d05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmb7=%}T>S6ot=>WgD$cQh?_ovAZUz{2qi63;|p}_y3p>VPau5* zeE}cIb0--C6)U}PnVZA8XEI;gZ+W;=I3FAjPVs;BXbDv1`{Hp>ujp(#xlQv#qlb8* z;85@QKy5{b-!?zy9QJ`ZPme90!+MrInXlN oYrPf+5eLjS`!x=Scbd$dh~3#{#XTZ6nOlfW<}bv}+xF-C4FXtG>;M1&