summaryrefslogtreecommitdiff
path: root/functions/sudo-execute.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/sudo-execute.fish')
-rw-r--r--functions/sudo-execute.fish5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions/sudo-execute.fish b/functions/sudo-execute.fish
new file mode 100644
index 0000000..3e3a463
--- /dev/null
+++ b/functions/sudo-execute.fish
@@ -0,0 +1,5 @@
+function sudo-execute -d "Command line editor function that prepends the current commandline with \"sudo\" and executes it afterwards"
+ commandline sudo\ (commandline | sed 's/^\W*sudo\?\W*//')
+ commandline -f repaint
+ commandline -f execute
+end