diff --git a/examples/settings/set-shell-elvish.gif b/examples/settings/set-shell-elvish.gif new file mode 100644 index 000000000..7b4b6f172 Binary files /dev/null and b/examples/settings/set-shell-elvish.gif differ diff --git a/examples/settings/set-shell-elvish.tape b/examples/settings/set-shell-elvish.tape new file mode 100644 index 000000000..6bce75f9f --- /dev/null +++ b/examples/settings/set-shell-elvish.tape @@ -0,0 +1,10 @@ +Output examples/settings/set-shell-elvish.gif + +Set FontSize 38 +Set Height 225 + +Set Shell elvish + +Sleep 1s +Type "I am using elvish." +Sleep 2s diff --git a/shell.go b/shell.go index 111675f63..acbf41f60 100644 --- a/shell.go +++ b/shell.go @@ -4,6 +4,7 @@ package main const ( bash = "bash" cmdexe = "cmd" + elvish = "elvish" fish = "fish" nushell = "nu" powershell = "powershell" @@ -64,4 +65,7 @@ var Shells = map[string]Shell{ nushell: { Command: []string{"nu", "--execute", "$env.PROMPT_COMMAND = {''}"}, }, + elvish: { + Command: []string{"elvish", "-c", `use os; var rc = (os:temp-file 'vhs-'); try { echo 'set edit:prompt = { styled "> " "#5B56E0" };set edit:rprompt = { }' > $rc; elvish -rc $rc[name] } finally { os:remove $rc[name] }`}, + }, }