From 9a934dc351040d6c76a155fe132fd7e11aa01cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 13 Apr 2015 10:47:46 +0200 Subject: [PATCH] pyenv and others --- Docker/Dockerfile | 4 +++- Xresources | 2 +- emacs.d/init.el | 1 + oh-my-zsh | 2 +- zshenv | 10 ++++++++++ zshrc | 22 ++++++++++------------ 6 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 zshenv diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 3eb867f..67ca109 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -49,6 +49,8 @@ RUN chsh dev -s /usr/bin/zsh RUN chown -R dev: /home/dev RUN chown -R dev: /usr/local/ +RUN echo "dev ALL = NOPASSWD: ALL" >> /etc/sudoers + +USER dev WORKDIR /home/dev/app ENTRYPOINT ["zsh"] -USER dev diff --git a/Xresources b/Xresources index 973ab06..14d13fb 100644 --- a/Xresources +++ b/Xresources @@ -11,7 +11,7 @@ Xft.hintstyle: hintfull !------------------------------------------------------------------------------- ! Emacs settings !------------------------------------------------------------------------------- -!Emacs.font: DejaVu Sans Mono-10 +Emacs.font: DejaVu Sans Mono-10 !------------------------------------------------------------------------------- ! URxvt settings diff --git a/emacs.d/init.el b/emacs.d/init.el index 838b6e4..58f2e57 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -200,6 +200,7 @@ (show-paren-mode t) (yas-global-mode 1) (guide-key-mode 1) +(scroll-bar-mode 0) ;;; Specific modes ;; (autoload 'markdown-mode "markdown-mode" diff --git a/oh-my-zsh b/oh-my-zsh index 5663d3a..6701c46 160000 --- a/oh-my-zsh +++ b/oh-my-zsh @@ -1 +1 @@ -Subproject commit 5663d3a1fe986303ba835fb8fc524236e8af72c3 +Subproject commit 6701c46bca7347c9de92d37d64957db978927623 diff --git a/zshenv b/zshenv new file mode 100644 index 0000000..b7540a1 --- /dev/null +++ b/zshenv @@ -0,0 +1,10 @@ +### Added by the Heroku Toolbelt +export PATH="$PATH:/usr/local/heroku/bin:$HOME/.cabal/bin" + +### Virtualenvwrapper +export WORKON_HOME=~/.virtualenvs + + +#export PYENV_ROOT="$HOME/.pyenv" +#export PATH="$PYENV_ROOT/bin:$PATH" +#eval "$(pyenv init -)" diff --git a/zshrc b/zshrc index 5d34c15..0a0b553 100644 --- a/zshrc +++ b/zshrc @@ -17,7 +17,7 @@ ZSH_THEME="balkian" # alias ohmyzsh="mate ~/.oh-my-zsh" # Set to this to use case-sensitive completion -# CASE_SENSITIVE="true" +CASE_SENSITIVE="true" # Comment this out to disable weekly auto-update checks # DISABLE_AUTO_UPDATE="true" @@ -32,12 +32,12 @@ export UPDATE_ZSH_DAYS=13 # DISABLE_AUTO_TITLE="true" # Uncomment following line if you want red dots to be displayed while waiting for completion -# COMPLETION_WAITING_DOTS="true" +COMPLETION_WAITING_DOTS="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) -plugins=(git colored-man virtualenvwrapper cp python wd systemadmin pass) +plugins=(git gitfast colored-man virtualenvwrapper cp python wd systemadmin pass) source $ZSH/oh-my-zsh.sh @@ -52,6 +52,7 @@ export ALTERNATE_EDITOR=/usr/bin/vim EDITOR="vim" VISUAL="vim" # Docker goodies alias drm="docker rm" +alias drun="docker run" alias drmi="docker rmi" alias dps="docker ps" alias dpi="docker images" @@ -68,20 +69,17 @@ function newdev () { docker run -v $PWD:/usr/src/app -t -i --name $1 -h $1 balkian/devmachine } +_docker # Force the load of autocompletion for docker +compdef __docker_containers da +compdef __ps drma + PYTHONSTARTUP=~/.pythonrc.py export PYTHONSTARTUP -ssh-add -l 2>&1 > /dev/null || alias ssh='ssh-add -l >/dev/null || ssh-add && unalias ssh; ssh'; alias mosh='ssh-add -l >/dev/null || ssh-add && unalias mosh; mosh' -### Added by the Heroku Toolbelt -export PATH="$PATH:/usr/local/heroku/bin:$HOME/.cabal/bin" - -### Virtualenvwrapper -export WORKON_HOME=~/.virtualenvs +ssh-add -l > /dev/null 2>&1 || alias ssh='ssh-add -l >/dev/null || ssh-add && unalias ssh; ssh'; alias mosh='ssh-add -l >/dev/null || ssh-add && unalias mosh; mosh' setopt extended_glob - -### Get RVM to work with zsh -[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" +setopt menu_complete ### Agent forwarding in tmux too if [ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/.ssh/ssh_auth_sock" ] ; then