Skip to content

Instantly share code, notes, and snippets.

@wheatdog
Created November 24, 2016 14:53
Show Gist options
  • Select an option

  • Save wheatdog/280461d43a3b4a4d38fa7cbc68d2bb05 to your computer and use it in GitHub Desktop.

Select an option

Save wheatdog/280461d43a3b4a4d38fa7cbc68d2bb05 to your computer and use it in GitHub Desktop.
part of sudo-write.kak
eval -save-regs %{/"|^@pf} %{
set buffer autoreload yes
prompt -password password: p %{
exec -draft \%"fy
nop %sh{
echo ${kak_reg_p} | sudo -S sh -c "printf '%s' \"${kak_reg_f}\" | tee ${kak_buffile} >/dev/null"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment