From dc23af6b32d4b89eea9ad904495ac5507b8835cc Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Sun, 22 Apr 2012 00:13:55 +0530 Subject: [PATCH] Fixed setting PATH variable in import_bash_settings.py --- runbash.sh | 6 +++--- share/tools/import_bash_settings.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runbash.sh b/runbash.sh index 922fb3351..97c0c0bd3 100755 --- a/runbash.sh +++ b/runbash.sh @@ -11,7 +11,7 @@ echo " if not set -q \$argv[1]" >> $bash_config echo " set -gx \$argv" >> $bash_config echo " end" >> $bash_config echo "end" >> $bash_config -echo "PS1=$PS1" | python import_bash_settings.py -alias | python import_bash_settings.py -env | python import_bash_settings.py +echo "PS1=$PS1" | python share/tools/import_bash_settings.py +alias | python share/tools/import_bash_settings.py +env | python share/tools/import_bash_settings.py diff --git a/share/tools/import_bash_settings.py b/share/tools/import_bash_settings.py index d5417bf64..bd59f0a8c 100755 --- a/share/tools/import_bash_settings.py +++ b/share/tools/import_bash_settings.py @@ -15,7 +15,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND """ import os, sys, re -import "deroff" +#import "deroff" config_file = None prompt_buff = "" @@ -108,6 +108,8 @@ def parse_input(input): add_alias(env_name[6:], env_value) elif env_name == "PS1": parse_bash_prompt(env_value) + elif env_name == "PATH": + config_file.write("set -x " + env_name + ' ' + env_value.replace(":"," ") ) else: config_file.write("set_default " + env_name + ' "' + env_value + '"') #Move to next line