Page 1 sur 1

[Vim] Problème avec la variable $EDITOR. (résolu)

Publié : ven. 18 sept. 2009, 15:59
par shyne
Bonjour,

Suite à la MAJ récente j'ai remplacé vi par vim depuis j'ai un problème curieux...

Code : Tout sélectionner

~ % echo $EDITOR
vim
~ % crontab -e
/bin/sh: /usr/bin/vi: Aucun fichier ou dossier de ce type
Je ne comprend pas pourquoi ma variable editor n'est plus pris en compte :(
Quelqu'un à une idée svp?

Merci.

Re: [Vim] Problème avec la variable $EDITOR.

Publié : ven. 18 sept. 2009, 16:22
par tuxce
cron fourni par arch ne prend pas en compte la variable EDITOR mais VISUAL

Re: [Vim] Problème avec la variable $EDITOR. (Résolu)

Publié : ven. 18 sept. 2009, 16:39
par shyne
Ah merci tuxce, je me disais aussi :roll:

Re: [Vim] Problème avec la variable $EDITOR.(Résolu)

Publié : ven. 18 sept. 2009, 16:49
par marc[i1]
Arch ne fourni pas cron mais dcron, on peut aussi avoir fcron ^^

Re: [Vim] Problème avec la variable $EDITOR.(Résolu)

Publié : ven. 18 sept. 2009, 16:59
par shyne
Par contre j'ai le même soucis avec visudo du coup :|

C'est quoi la variable ce coup-ci? :mrgreen:

Re: [Vim] Problème avec la variable $EDITOR. (à moitié résolu)

Publié : ven. 18 sept. 2009, 17:08
par tuxce
l'une des 2 au choix, la première étant en promotion.

Re: [Vim] Problème avec la variable $EDITOR. (à moitié résolu)

Publié : ven. 18 sept. 2009, 17:31
par shyne
Ok, en rajoutant:

Code : Tout sélectionner

Defaults        editor=/usr/bin/vim
Ca roule.
man sudoers a écrit : env_editor

If set, visudo will use the value of the EDITOR or VISUAL environment variables before falling back on the default editor list. Note that this may create a security hole as it allows the user to run any arbitrary command as root without logging. A safer alternative is to place a colon-separated list of editors in the editor variable. visudo will then only use the EDITOR or VISUAL if they match a value specified in editor. This flag is off by default.

...

editor

A colon (':') separated list of editors allowed to be used with visudo. visudo will choose the editor that matches the user's EDITOR environment variable if possible, or the first editor in the list that exists and is executable. The default is the path to vi on your system.