From 546d7d88110d5b5b13c0a9a52f4fb2b800abe1d7 Mon Sep 17 00:00:00 2001 From: mattbw Date: Wed, 22 Oct 2014 04:43:27 +0100 Subject: [PATCH] Give correct eval stanza for csh/tcsh. These shells don't support $() notation, so fall back to `` notation. --- commands/alias.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/alias.go b/commands/alias.go index 9dd88b4a..61e34b70 100644 --- a/commands/alias.go +++ b/commands/alias.go @@ -83,9 +83,12 @@ func alias(command *Command, args *Args) { fmt.Println(msg) var eval string - if shell == "fish" { + switch shell { + case "fish": eval = `eval (hub alias -s)` - } else { + case "csh", "tcsh": + eval = "eval \"`hub alias -s`\"" + default: eval = `eval "$(hub alias -s)"` } fmt.Println(eval) -- GitLab