Skip to content

fix: tilde expansion for aliases#158

Open
gregnr wants to merge 1 commit intovercel-labs:mainfrom
gregnr:fix/tilde-for-aliases
Open

fix: tilde expansion for aliases#158
gregnr wants to merge 1 commit intovercel-labs:mainfrom
gregnr:fix/tilde-for-aliases

Conversation

@gregnr
Copy link
Copy Markdown

@gregnr gregnr commented Mar 17, 2026

Tilde expansion for aliases currently fails:

const bash = new Bash({
  env: { HOME: "/home/user", BASH_ALIAS_ll: "ls -alF" },
});
await bash.exec("shopt -s expand_aliases");

await bash.exec("ls -alF ~/"); // lists /home/user
await bash.exec("ll ~/");      // lists /

Problem was that wordNodeToString() in alias-expansion.ts serializes alias args back to a string, but was missing a case for TildeExpansion nodes so the ~ got silently dropped. This PR adds the TildeExpansion case + a test to confirm the fix.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 17, 2026

@gregnr is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant