Make sudo for user only

This commit is contained in:
lionel 2024-09-19 22:16:45 +02:00
parent a04bec3087
commit 7b0f4f8a38
2 changed files with 6 additions and 4 deletions

View File

@ -127,6 +127,12 @@ if ! shopt -oq posix; then
fi fi
fi fi
# Add sudo on start of line if installed and no root user
# Alt-s:
if [ "$(id -u)" -ne 0 ] && [ -f /usr/bin/sudo ]; then
bind '"\es": "\C-asudo \C-e"'
fi
export LESS_TERMCAP_mb=$'\e[1;32m' export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m' export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m' export LESS_TERMCAP_me=$'\e[0m'

View File

@ -56,10 +56,6 @@ set skip-completed-text On
#set completion-prefix-display-length 9 #set completion-prefix-display-length 9
# Add sudo on start of line
# Alt-s:
"\es": "\C-asudo \C-e"
"\em": shell-forward-word "\em": shell-forward-word
"\eq": shell-backward-word "\eq": shell-backward-word
# Alt-f: # Alt-f: