From 67b66e6ce43ea09d1f5ce7865d7db2139bd707df Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Sat, 15 Apr 2017 08:49:01 +0200 Subject: [PATCH] Added x509 function and venv for python3 --- zsh.d/10-environment.zsh | 2 ++ zsh.d/90-virtualenv.zsh | 28 ++++++++++++++++++++++++++++ zsh.d/Darwin/50-darwin.zsh | 2 +- zsh.d/zshfunctions/x509 | 1 + zsh.d/zshfunctions/x509.zwc | Bin 0 -> 344 bytes 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 zsh.d/zshfunctions/x509 create mode 100644 zsh.d/zshfunctions/x509.zwc diff --git a/zsh.d/10-environment.zsh b/zsh.d/10-environment.zsh index 122cc2c..715036a 100644 --- a/zsh.d/10-environment.zsh +++ b/zsh.d/10-environment.zsh @@ -24,6 +24,8 @@ WATCHFMT="%n %a %l (%m) at %t." EDITOR=vim VISUAL=vim + +export QUOTING_STYLE=escape # # Hack for svn export SVN_EDITOR=${VISUAL} diff --git a/zsh.d/90-virtualenv.zsh b/zsh.d/90-virtualenv.zsh index 8228a06..b809eb6 100644 --- a/zsh.d/90-virtualenv.zsh +++ b/zsh.d/90-virtualenv.zsh @@ -24,4 +24,32 @@ function venv { echo } +function venv3 { + + # 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 + + VIRTUALENV_SCRIPT=/usr/local/bin/virtualenvwrapper.sh + export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 + export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv + # export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' + + [ -d $WORKON_HOME ] || mkdir -p $WORKON_HOME + [ -d $PROJECT_HOME ] || mkdir -p $PROJECT_HOME + + source $VIRTUALENV_SCRIPT + + echo "virtualenv enabled." + echo "WORKON_HOME: $WORKON_HOME" + echo "PROJECT_HOME: $PROJECT_HOME" + echo + echo "Virtualenvs:" + lsvirtualenv -b + echo +} # vim: set ts=4 sw=4 tw=0 ft=sh : diff --git a/zsh.d/Darwin/50-darwin.zsh b/zsh.d/Darwin/50-darwin.zsh index 8a172cb..c8f2e71 100644 --- a/zsh.d/Darwin/50-darwin.zsh +++ b/zsh.d/Darwin/50-darwin.zsh @@ -1,6 +1,6 @@ # Darwin/OSX # Environment and aliases for OSX -export LSCOLORS="GxgxcxdxCxegedabagacad" +export LSCOLORS="ExgxcxdxCxegedabagacad" alias ldd='otool -L' alias ls='ls -F -G' alias skill=killall diff --git a/zsh.d/zshfunctions/x509 b/zsh.d/zshfunctions/x509 new file mode 100644 index 0000000..3b87a68 --- /dev/null +++ b/zsh.d/zshfunctions/x509 @@ -0,0 +1 @@ +openssl x509 -in $1 -noout -text | less diff --git a/zsh.d/zshfunctions/x509.zwc b/zsh.d/zshfunctions/x509.zwc new file mode 100644 index 0000000000000000000000000000000000000000..5ce312bd36dca919adb9b264c47a3c7a30ae6b8a GIT binary patch literal 344 zcmZQ)V`X7j!@yvwXT(4Z5CJNRhAOlH(i~8Bg{grh15nbDiGhL1fPrB#RPGp5UI9pF zc@{Hk_b@V;0NDXR+ziBOK%4=@Adp{>npa$$!vHo*H!nZGw1h#oB(#OhqI`CuEF92po4fG);#E_1PG76W6CHc$?$a|yW>080-hZvX%Q literal 0 HcmV?d00001