• # ZEN c'est zen !

    Posté par (site web personnel) . En réponse à la dépêche Restez ZEN avec ZSH. Évalué à 5.

    Moi je dis c'est magique zen :

    % zen search zle

    Package | Description
    -----------------------------------------------------------------------------------------------------------------
    zsh/zle/insert-root-prefix | Insert sudo or pfexec in the beginning of the line
    zsh/zle/dirname-current-arg | replace current argument by its parent directory
    zsh/zle/previous-file-nocomp | replace current argument by the previous file as if you were
    zsh/zle/next-file-nocomp | replace current argument by the next file as if you were



    % zen install zsh/zle/insert-root-prefix
    INF: Installing package zsh/zle/insert-root-prefix
    % zle -N zsh/zle/insert-root-prefix
    % autoload -U zsh/zle/insert-root-prefix
    % bindkey '^[v' zsh/zle/insert-root-prefix

    Et hop j'ai mon widget zle qui rajoute pfexec (ou sudo, sur les autres OS) en début de ligne quelque soit la position de mon curseur!