Fabian Homborg e646285bcb
Let __fish_prepend_sudo use the last commandline if there is no current one (#7079)
* docs/faq: Mention prepend_sudo

[ci skip]

* __fish_prepend_sudo: Use $history[1] if commandline is empty

Currently, if you press alt+s with an empty commandline, it inserts
"sudo", which seems fairly useless.

Now, it inserts "sudo " followed by the last history entry, which
makes it a replacement for `sudo !!`.

* docs
2020-06-04 18:25:02 +02:00
..
2020-05-28 17:41:01 +02:00
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2020-02-17 14:14:05 +01:00
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2020-04-21 21:11:26 +02:00
2020-01-24 19:05:08 +01:00
2018-05-12 13:48:32 +02:00
2019-05-05 12:09:25 +02:00
2017-10-01 01:11:17 -07:00
2019-05-06 17:06:40 +02:00
2020-05-23 14:30:00 +02:00
2019-02-14 10:57:38 +01:00
2020-04-26 14:39:15 +02:00