Skip to content

Commit c31476b

Browse files
committed
removing specific fish instructions to keep things lean
1 parent 9ccedb9 commit c31476b

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

internal/devbox/devbox.go

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,22 @@ func (d *Devbox) EnvExports(ctx context.Context, opts devopt.EnvExportsOpts) (st
376376
}
377377

378378
if opts.RunHooks {
379-
var hooksStr string
380-
if opts.ShellFormat == devopt.ShellFormatNushell {
381-
// Nushell uses 'source' command
382-
hooksStr = "source \"" + shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename) + "\""
383-
} else {
384-
// Bash/Zsh/Fish use '.' command
385-
hooksStr = ". \"" + shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename) + "\""
386-
}
379+
hooksStr := ". \"" + shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename) + "\""
387380
envStr = fmt.Sprintf("%s\n%s;\n", envStr, hooksStr)
388381
}
389382

383+
// if opts.RunHooks {
384+
// var hooksStr string
385+
// if opts.ShellFormat == devopt.ShellFormatNushell {
386+
// // Nushell uses 'source' command
387+
// hooksStr = "source \"" + shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename) + "\""
388+
// } else {
389+
// // Bash/Zsh/Fish use '.' command
390+
// hooksStr = ". \"" + shellgen.ScriptPath(d.ProjectDir(), shellgen.HooksFilename) + "\""
391+
// }
392+
// envStr = fmt.Sprintf("%s\n%s;\n", envStr, hooksStr)
393+
// }
394+
390395
if !opts.NoRefreshAlias {
391396
envStr += "\n" + d.refreshAliasForShell(string(opts.ShellFormat))
392397
}

internal/devbox/refresh.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ func (d *Devbox) refreshCmdForShell(format string) string {
6464
// Nushell doesn't have eval; use overlay or source with temporary file
6565
return fmt.Sprintf(`devbox %s | save -f ~/.cache/devbox-env.nu; source ~/.cache/devbox-env.nu`, devboxCmd)
6666
}
67-
if format == "fish" || isFishShell() {
68-
return fmt.Sprintf(`eval (devbox %s | string collect)`, devboxCmd)
69-
}
7067
return fmt.Sprintf(`eval "$(devbox %s)" && hash -r`, devboxCmd)
7168
}
7269

0 commit comments

Comments
 (0)