X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=8643fae5aef2f814931f315eb54efcfa651f414c;hb=67cea680f31987b31696a005b68a2a156fdd8677;hp=0b82cb3300004853a06774c1b50fb46b83d4eeea;hpb=dc4eb5bb4a81c8dbe312bd0f79721fe3a3dd6af8;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 0b82cb3..8643fae 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -938,7 +938,10 @@ bindkey '^z' grml-zsh-fg # run command line as user root via sudo: sudo-command-line() { [[ -z $BUFFER ]] && zle up-history - [[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER" + if [[ $BUFFER != sudo\ * ]]; then + BUFFER="sudo $BUFFER" + CURSOR=$(( CURSOR+5 )) + fi } zle -N sudo-command-line @@ -2052,9 +2055,7 @@ function info_print () { esc_end="$2" shift 2 printf '%s' ${esc_begin} - for item in "$@" ; do - printf '%s ' "$item" - done + printf '%s' "$*" printf '%s' "${esc_end}" }