Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with expansion and backslashes
On Aug 16, 1:14am, Oliver Kiddle wrote:
} Subject: bug with expansion and backslashes
}
} On 25 Apr, Bart wrote:
} > } > add backslash to alias expansion matching in _expand
} > --- a/Completion/Base/Completer/_expand
} > setopt aliases
} > eval 'exp=( ${${(e)exp//\\[
} > -]/ }//(#b)([
} > +]/ }//(#b)([ \\
} > ])/\\$match[1]} )' 2>/dev/null
}
} I just noticed that expansion was broken when I tried to expand *\~
} (exiftran backs up files with a trailing ~ and I wanted to clean them up)
} git bisect led me to 33ff5d06 which is the patch above.
}
} What's not clear to me is what problem this patch was trying to solve.
Look at workers/32186 which refers back to users/18247 and its thread.
It has to do with glob-expansion of file names that contain a character
that needs to be protected with a backslash, particularly file names
actually containing backslashes and/or quote marks.
(In other words, if you had attempted to complete "*~" without having
the backslash in there already, it would have worked and inserted the
backslash for you.)
I have no objection to backing out that change again, although it works
as expected when extendedglob is NOT set.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author