From 8f50ca720e6f0eb2324a0c73f448e2edead91804 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Nov 2024 19:33:41 -0800 Subject: [PATCH] remove the ~ '/' / '\\' logic in interpreter.zig as it's now handled in shell.zig --- src/shell/interpreter.zig | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/shell/interpreter.zig b/src/shell/interpreter.zig index f4264570f0..2529e9f158 100644 --- a/src/shell/interpreter.zig +++ b/src/shell/interpreter.zig @@ -2112,17 +2112,7 @@ pub const Interpreter = struct { if (this.node.hasTildeExpansion() and this.node.atomsLen() > 1) { const homedir = this.base.shell.getHomedir(); defer homedir.deref(); - if (this.current_out.items.len > 0) { - switch (this.current_out.items[0]) { - '/', '\\' => { - this.current_out.insertSlice(0, homedir.slice()) catch bun.outOfMemory(); - }, - else => { - // TODO: Handle username - this.current_out.insert(0, '~') catch bun.outOfMemory(); - }, - } - } + this.current_out.insertSlice(0, homedir.slice()) catch bun.outOfMemory(); } // NOTE brace expansion + cmd subst has weird behaviour we don't support yet, ex: