From 031336b639ccd5d093ae26b5fcfda374b50b510b Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Mon, 01 Jun 2020 12:43:23 +0000
Subject: [PATCH] Genericised shell options

---
 all-shells/.commonshell |    4 ++--
 bash/.bashrc            |    4 ++--
 zsh/.zshrc              |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/all-shells/.commonshell b/all-shells/.commonshell
index a1a6a8c..36f5d44 100644
--- a/all-shells/.commonshell
+++ b/all-shells/.commonshell
@@ -9,11 +9,11 @@
 export EDITOR=/usr/bin/vim
 
 #default wine prefix
-export WINEPREFIX=/home/joel/.wine/Games/
+export WINEPREFIX=$HOME/.wine/Games/
 export STEAM_COMPAT_DATA_PATH=$HOME/proton
 
 export LIBVA_DRIVER_NAME=iHD
 
 # add to path
 export PATH=$PATH:~/.local/bin
-PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
+[ -r /usr/bin/ruby ] && PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
diff --git a/bash/.bashrc b/bash/.bashrc
index 05d5d2f..3299c72 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -2,6 +2,6 @@
 PS1="[\u@\h \W]\$ "
 PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
 
-source /home/joel/.commonshell
-source /usr/share/doc/pkgfile/command-not-found.bash
+source ~/.commonshell
+[ -r /usr/share/doc/pkgfile/command-not-found.bash ] && source /usr/share/doc/pkgfile/command-not-found.bash
 [ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 2abab2b..ef4af02 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -12,9 +12,9 @@
 unsetopt beep notify # Turn off terminal beeps
 bindkey -e #Emacs mode
 
-# common aliases
+# common shell options
 source ~/.commonshell
-source /usr/share/doc/pkgfile/command-not-found.zsh
+[ -f /usr/share/doc/pkgfile/command-not-found.zsh ] && source /usr/share/doc/pkgfile/command-not-found.zsh
 
 # Make the delete key work normally
 bindkey '^[[3~' delete-char

--
Gitblit v1.9.3