Re: Setting the editor environment variable for crontabs in Fedora 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Ferrari wrote:

> > Hi Luca, are you running fedora 2? I actually tried to
> > open the crontab using vi and it seems the default
> > editor for crontabs on my system is not set to vi. So
> > for example once the crontab has been opened i am not
> > able to save it using vi commands. so puting the same
> > exact line on .profile file should export an editor of
> > my choice. can i export nano?
> 

> At the moment no, I'm running the 1 and other suse systems. 
> Nevertheless, what does echo $EDITOR shows to you? It should be the
> editor used.

The crontab program probably uses $VISUAL in preference to $EDITOR.

Historically, $EDITOR would be used on a "dumb" terminal which didn't
support curses-style functionality (e.g. a hardcopy terminal), while
$VISUAL would be used on a terminal which was capable of supporting a
"visual" editor such as vi.

Nowadays, most programs take it for granted that all terminals are
capable of supporting a visual editor, and try $VISUAL first then
$EDITOR, regardless of the terminal type.

FWIW, most versions of vi fall back to behaving like ed if the
terminal doesn't provide the necessary functionality (e.g. cursor
positioning).

-- 
Glynn Clements <glynn.clements@xxxxxxxxxx>
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux