tb Fix alias expansion

This commit is contained in:
2025-09-28 23:27:04 +02:00
parent 2b93d6d184
commit e03e950879

View File

@ -81,7 +81,7 @@ void tz_expandspecial(Tokenizer *tz) {
if (tk->str[0] == '$' && string_len(tk->str) > 1) {
RtAlias *alias, *aliastmp;
LL_FOREACH_SAFE(RTALIASES, alias, aliastmp) {
if (string_strcmp(alias->namebuf, tk->str) == 0) {
if (string_strcmp(alias->namebuf, tk->str+1) == 0) {
ufree(tk->str);
size_t len = string_len(alias->valbuf)+1;
tk->str = umalloc(len);