Why crontab -e doesn't use the correct editor?
Peng Yu
pengyu.ut at gmail.com
Fri Nov 11 22:04:33 UTC 2011
On Fri, Nov 11, 2011 at 11:26 AM, roberto.preziusi at gmail.com
<roberto.preziusi at gmail.com> wrote:
>
>
> 2011/11/11 Peng Yu <pengyu.ut at gmail.com>
>
>>
>> I have the above environment. But when I call run "crontab -e". nano
>> is invoked. I think that vim.genome should be called. I'm wondering
>>
>> why the correct one is not called?
>
> try:
>
> sudo update-alternatives --config editor
>
> bye
vim has already been selected. I'm not sure why crontab -e doesn't use
it. I have to set the environment variable EDITOR to use vim. Does
crontab -e use some logic different from what is described in the man
page to select the editor?
~$ sudo update-alternatives --config editor
[sudo] password for pengy:
There are 6 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/vim.gnome 60 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/mcedit 25 manual mode
4 /usr/bin/vim.gnome 60 manual mode
5 /usr/bin/vim.gtk 50 manual mode
6 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number:
--
Regards,
Peng
More information about the ubuntu-users
mailing list