From c8fb4a598c6067944d4d4ea3c13856f28167f4e7 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 9 Apr 2016 17:19:49 +0100 Subject: Use environment variable in dotfiles --- zsh/functions | 11 +---------- zsh/plugins | 2 +- zsh/zshrc | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'zsh') diff --git a/zsh/functions b/zsh/functions index 2b43e1a..7c2b49a 100644 --- a/zsh/functions +++ b/zsh/functions @@ -6,7 +6,7 @@ function colo { $HOME/bin/recolor < ~/.Xresources/$1 # Load Xresources file for future sessions - xrdb ~/.Xresources/$1 + xrdb -I$HOME ~/.Xresources/$1 # Change environment variable export COLORSCHEME=$1 @@ -14,12 +14,3 @@ function colo { # Change default environment variable for future sessions sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp } - -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} diff --git a/zsh/plugins b/zsh/plugins index d1f5bad..43b2916 100644 --- a/zsh/plugins +++ b/zsh/plugins @@ -1,7 +1,7 @@ #! /bin/zsh # Load zgen -source "/home/urbain/.zgen/zgen.zsh" +source "$HOME/.zgen/zgen.zsh" # Load plugins if ! zgen saved; then diff --git a/zsh/zshrc b/zsh/zshrc index ee46766..fe44e9e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -14,7 +14,7 @@ bindkey '^P' history-beginning-search-backward bindkey '^N' history-beginning-search-forward # Paths of executables -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/core_perl:/home/urbain/bin" +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/core_perl:$HOME/bin" # Editor export EDITOR=/usr/bin/nvim @@ -32,7 +32,7 @@ fi # Export GPG-agent related if [[ -f "${HOME}/.gpg-agent-info" ]]; then - source /home/urbain/.gpg-agent-info + source ${HOME}/.gpg-agent-info export GPG_AGENT_INFO export SSH_AUTH_SOCK fi -- cgit v1.2.3