From 27e0004b474fd5be8623c63aae4f95849c62dfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Wed, 25 Mar 2020 18:05:36 +0100 Subject: [PATCH] Bash: config changes --- files/.bash_aliases | 1 + files/.bashrc | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/files/.bash_aliases b/files/.bash_aliases index 975e1da..f07ce10 100644 --- a/files/.bash_aliases +++ b/files/.bash_aliases @@ -41,3 +41,4 @@ alias showcolors='for i in {0..255} ; do \ printf "\n"; \ fi; done' +alias scanimage-arcoloc="scanimage -d 'smfp:net;192.168.0.202' --format=jpeg" diff --git a/files/.bashrc b/files/.bashrc index 4fb864d..98b8a2f 100644 --- a/files/.bashrc +++ b/files/.bashrc @@ -52,10 +52,18 @@ export TERMINAL="/usr/bin/terminator" export LC_REALUSER='tbastian' +# Autojump +[ -f /etc/profile.d/autojump.bash ] && source /etc/profile.d/autojump.bash + # Opam which opam > /dev/null 2>&1 && [ -d ~/.opam ] && eval $(opam config env) # Gem -if [ -d "$HOME/.gem/ruby/2.4.0/bin" ] ; then - export PATH="$PATH:$HOME/.gem/ruby/2.4.0/bin" +gempath="$HOME/.gem/ruby" +if [ -d "$gempath" ] && [ "$(ls -1 $gempath | wc -l)" -gt 0 ] +then + cur_version=$(ls -1t $gempath | head -n 1) + cur_path="$gempath/$cur_version/bin" + export PATH="$PATH:$cur_path" fi +unset gempath