fish: simple command with environment variable #41

GReagle opened this Issue Sep 24, 2015 · 0 comments


None yet

1 participant

GReagle commented Sep 24, 2015

Can you create another entry in the first table "Grammar" for fish, row "simple command with environment variable"? env EDITOR=vi git commit is indeed correct, but there is another way that will work with fish functions as well, whereas env expects a real command. The other option is:

begin; set -lx EDITOR vi; git commit; end

This is actually the equivalent in fish using fish grammar and syntax. The env command method works for all shells.
See fish-shell/fish-shell#2415 for a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment