[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sudo !! as alias
From: |
lacsaP Patatetom |
Subject: |
sudo !! as alias |
Date: |
Thu, 20 Apr 2023 09:49:03 +0200 |
hi,
I have `alias please='sudo $(history -p !!)'` in my `.bashrc` which
more or less corresponds to the command `sudo !!`.
however, the latter benefits from the `histverify` option which brings
some flexibility (modification) and security (validation).
Is it possible to make the `please` alias behave like `sudo !!` (eg.
take into account `histverify` option) ?
I have modified my `please` alias to `echo -n sudo $(history -p !!);
read -s; echo; sudo $(history -p !!)` but I don't have the possibility
to modify the command.
I also tried to use the `fc` command with it but it uses an external
editor, which I don't like.
regards, lacsaP.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sudo !! as alias,
lacsaP Patatetom <=