mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Merge branch 'mic-e-master'
This commit is contained in:
commit
c1ecff25f8
1 changed files with 9 additions and 2 deletions
|
@ -82,8 +82,15 @@ def bash_aliases():
|
|||
aliases = {}
|
||||
for key, value in items:
|
||||
try:
|
||||
key = key[6:]
|
||||
value = value.strip('\'')
|
||||
key = key[6:] # lstrip 'alias '
|
||||
|
||||
# undo bash's weird quoting of single quotes (sh_single_quote)
|
||||
value = value.replace('\'\\\'\'', '\'')
|
||||
|
||||
# strip one single quote at the start and end of value
|
||||
if value[0] == '\'' and value[-1] == '\'':
|
||||
value = value[1:-1]
|
||||
|
||||
value = shlex.split(value)
|
||||
except ValueError as exc:
|
||||
warn('could not parse Bash alias "{0}": {1!r}'.format(key, exc),
|
||||
|
|
Loading…
Add table
Reference in a new issue