Interesting Linux tools

2022年5月18日

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