Skip to content

Commit

Permalink
Update shell_elvish.go (#896)
Browse files Browse the repository at this point in the history
Upgrades to the newer Elvish syntax:
https://github.com/elves/upgrade-scripts-for-0.17
  • Loading branch information
icidasset committed Apr 21, 2022
1 parent 163835e commit e5a6e4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/cmd/shell_elvish.go
Expand Up @@ -12,12 +12,12 @@ var Elvish Shell = elvish{}

func (elvish) Hook() (string, error) {
return `## hook for direnv
@edit:before-readline = $@edit:before-readline {
set @edit:before-readline = $@edit:before-readline {
try {
m = [("{{.SelfPath}}" export elvish | from-json)]
var m = [("{{.SelfPath}}" export elvish | from-json)]
if (> (count $m) 0) {
m = (all $m)
keys $m | each [k]{
set m = (all $m)
keys $m | each { |k|
if $m[$k] {
set-env $k $m[$k]
} else {
Expand Down

0 comments on commit e5a6e4c

Please sign in to comment.