by kakulukia · 4y ago · 0 comments
alias please='sudo zsh -c "$(fc -ln -1)"' # rerun the last command with sudo (because it failed )
Easier PATH management:
# nicer path configuration and lookup function path { if [[ $# -eq 0 ]]; then echo -e ${PATH//:/\\n} | sort elif [[ "$1" == "--save" ]]; then path $2 && echo "\npath $2" >> $HOME/.profile else if [[ -d "$1" ]] ; then if [[ -z "$PATH" ]] ; then export PATH=$1 else export PATH=$1:$PATH fi else echo "$1 does not exist :(" return 1 fi fi }
No comments yet.