From 1fecc5be75f1a450224f0611c5c9e4090328daf0 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Wed, 10 Feb 2016 20:49:44 +0200 Subject: [PATCH] add current path --- qcd_function | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcd_function b/qcd_function index a169bf3..68a61ac 100644 --- a/qcd_function +++ b/qcd_function @@ -356,3 +356,10 @@ function set_term_title { echo -e '\033k'$1'\033\\' } } + +function path_add_current { + PATH=$( pwd ):$PATH + PATH=$( echo $PATH | awk -F: '{for (i=1;i<=NF;i++) { if ( !x[$i]++ ) printf("%s:",$i); }}' | sed 's,:\+$,,g' ) + export PATH + echo PATH=$PATH +}