Interesting Linux tools

zsh plugins

sudo

Press ESC twice (you can change the shortcut) to add prefix sudo. You still need to press enter to execute the command.

I coincidently wrote another one.

function addSudo 
{
	BUFFER="sudo $BUFFER"
	zle accept-line
}
zle -N addSudo_widget addSudo
bindkey '\C-s' addSudo_widget

Apart from changing the shortcut from ESC ESC to ctrl-s, mine automatically executes the modified command.

catimg

Renders images in the terminal

发表评论

电子邮件地址不会被公开。

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)