Fixed setting PATH variable in import_bash_settings.py

This commit is contained in:
Siteshwar Vashisht 2012-04-22 00:13:55 +05:30
parent b1bfa71338
commit dc23af6b32
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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