From 215a6ffd178d299b0cab24fd071c287d3a68b856 Mon Sep 17 00:00:00 2001 From: tracer Date: Sun, 16 Feb 2020 13:27:19 +0100 Subject: [PATCH] added fake sudo --- .zshrc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.zshrc b/.zshrc index f4c1b87..48e82d6 100644 --- a/.zshrc +++ b/.zshrc @@ -14,13 +14,17 @@ export EDITOR='vim' bindkey "^[^[[D" backward-word bindkey "^[^[[C" forward-word setopt auto_cd -alias ls="lsd" -alias l="lsd" -alias lr="lsd -ltr" -alias ll="lsd -la" -alias lt="lsd --tree" +alias l="ls" +alias lr="ls -ltr" +alias ll="ls -las" setopt PROMPT_SUBST export PROMPT='$(cdbm -add)'$PROMPT function c() { dir=$(cdbm 3>&1 1>&2 2>&3); cd $dir; } function pb() { echo "$1" | nc pastebin.24unix.net 9999 } +function sudo() { + arguments=$@ + command=$1 + arguments=${arguments[@]/$command} + eval "$command $arguments" +}