Skip to content

Commit

Permalink
Fix for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnphm committed May 19, 2015
1 parent 1831b14 commit 506356f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .config/fish/functions/__bass.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/python3
"""
To be used with a companion fish function like this:
Expand All @@ -22,7 +23,7 @@ def gen_script():
command = '{}; echo "{}"; env'.format(' '.join(sys.argv[1:]), divider)
stdout, new_env = (subprocess
.check_output(['bash', '-c', command])
.split(divider, 1))
.decode().split(divider, 1))
new_env = new_env.lstrip().splitlines()

old_env = dict([line.split('=', 1) for line in old_env])
Expand Down Expand Up @@ -55,6 +56,7 @@ def gen_script():
name = gen_script()
except Exception as e:
sys.stderr.write(str(e) + '\n')
raise e
print('__error')
else:
print(name)

0 comments on commit 506356f

Please sign in to comment.