From 4b8dc34b5d83c4cfd9b33f794147770aab0a4f73 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 27 Nov 2013 01:50:33 +0100 Subject: Add insert-sudo command --- .zsh/functions/insert-sudo | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .zsh/functions/insert-sudo (limited to '.zsh/functions/insert-sudo') diff --git a/.zsh/functions/insert-sudo b/.zsh/functions/insert-sudo new file mode 100644 index 0000000..4fc68e6 --- /dev/null +++ b/.zsh/functions/insert-sudo @@ -0,0 +1,5 @@ +# -*- mode: sh; -*- +# Copied and modified from +# http://zshwiki.org/home/code/zle/addsudoorpfexec +BUFFER="sudo $(history -n -1 -1)" +CURSOR=$#BUFFER -- cgit v1.2.3-54-g00ecf