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

Mise à jour / Création /debug de paquetages
Avatar de l’utilisateur
shyne
Hankyu
Messages : 32
Inscription : ven. 10 avr. 2009, 22:24

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

Message 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.
Dernière modification par shyne le ven. 18 sept. 2009, 17:32, modifié 3 fois.
Avatar de l’utilisateur
tuxce
Maître du Kyudo
Messages : 6677
Inscription : mer. 12 sept. 2007, 16:03

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

Message par tuxce »

cron fourni par arch ne prend pas en compte la variable EDITOR mais VISUAL
Avatar de l’utilisateur
shyne
Hankyu
Messages : 32
Inscription : ven. 10 avr. 2009, 22:24

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

Message par shyne »

Ah merci tuxce, je me disais aussi :roll:
Avatar de l’utilisateur
marc[i1]
Maître du Kyudo
Messages : 1753
Inscription : ven. 27 oct. 2006, 10:48
Localisation : Nantes (44)

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

Message par marc[i1] »

Arch ne fourni pas cron mais dcron, on peut aussi avoir fcron ^^
Ne vous emmerdez plus, emmerdez les autres.
Avatar de l’utilisateur
shyne
Hankyu
Messages : 32
Inscription : ven. 10 avr. 2009, 22:24

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

Message par shyne »

Par contre j'ai le même soucis avec visudo du coup :|

C'est quoi la variable ce coup-ci? :mrgreen:
Avatar de l’utilisateur
tuxce
Maître du Kyudo
Messages : 6677
Inscription : mer. 12 sept. 2007, 16:03

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

Message par tuxce »

l'une des 2 au choix, la première étant en promotion.
Avatar de l’utilisateur
shyne
Hankyu
Messages : 32
Inscription : ven. 10 avr. 2009, 22:24

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

Message 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.
Répondre