Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In bash, I can do EDITOR=vim crontab -e. Can I get similar effect in Fish shell?

share|improve this question

2 Answers

up vote 6 down vote accepted
begin; set -lx EDITOR vim; crontab -e; end
share|improve this answer
1  
is there any easier way to do this? – Milovan Zogovic Oct 29 '12 at 8:43
oddly, this doesn't work for me. I'm calling a ruby script, and ENV doesn't pick up the variable I'm setting: set -lx date '12/04/2012' – Duke Dec 7 '12 at 23:13
@Duke: It works for me. begin; set -lx date '12/04/2012'; ruby -e 'puts ENV["date"]'; end – Dennis Williamson Dec 8 '12 at 0:49

Don't see why this shouldn't work: env EDITOR=vim crontab -e
That bypasses the shell completely.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.