Closed henrebotha closed 3 years ago
Oh, this isn't an external command. ${(f)"$(foo)"}
is short for ${(ps|\n|)"$(foo)"}
, which is just a Zsh parameter expansion (see "Parameter Expansion Flags" in man zshexpn
), so I'm doing virtually the same thing here, just replacing the pattern \n
with \nalias.
.
Oh yes I read to hastily. Thought I was seeing ps | …
. Great, will move forward with this later today
It is possible to define a Git alias that contains line breaks. Previously, this would result in zsh-abbr attempting to parse each individual line as if it were a separate alias, resulting in lots of errors. The cause of this was splitting the output of
git config --get-regexp
on line breaks.This change splits the output of
git config --get-regexp
on newlines followed by the string "alias.", thereby ensuring that an alias that takes multiple lines gets treated as a unit.Unfortunately this splitting doesn't get rid of the prefix "alias." on the very first alias, and so we need to retain the substitution that gets rid of this prefix.
Resolves #30.