mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
fix(aliases): preserve trailing double quotes in als output
This commit is contained in:
parent
a07126330b
commit
c7352fa45f
1 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,9 @@ import argparse
|
|||
|
||||
def parse(line):
|
||||
left = line[0:line.find('=')].strip()
|
||||
right = line[line.find('=')+1:].strip('\'"\n ')
|
||||
right = line[line.find('=')+1:].strip('\n ')
|
||||
if len(right) >= 2 and right[0] == right[-1] and right[0] in '\'"':
|
||||
right = right[1:-1]
|
||||
try:
|
||||
cmd = next(part for part in right.split() if len([char for char in '=<>' if char in part])==0)
|
||||
except StopIteration:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue