📜  须藤!!别名 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:41.054000             🧑  作者: Mango

代码示例1
# You can use the 'history' built-in to do the expansion:
alias please='sudo $(history -p !!)'

# If the command is more than a simple command (e.g. it contains redirections or pipes), you need to invoke a shell under sudo:
alias please='sudo "$BASH" -c "$(history -p !!)"'