Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Senderman/doas-zsh-plugin
Simple zsh plugin to insert doas by pressing double-ESC (forked from OMZ's sudo plugin)
https://github.com/Senderman/doas-zsh-plugin
Last synced: about 1 month ago
JSON representation
Simple zsh plugin to insert doas by pressing double-ESC (forked from OMZ's sudo plugin)
- Host: GitHub
- URL: https://github.com/Senderman/doas-zsh-plugin
- Owner: Senderman
- License: mit
- Created: 2021-09-17T00:49:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-25T09:46:44.000Z (3 months ago)
- Last Synced: 2024-02-25T10:41:41.373Z (3 months ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - doas (senderman) - Easily prefix your current or previous commands with `doas` by pressing `ESC` twice. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - doas (senderman) - Easily prefix your current or previous commands with `doas` by pressing `ESC` twice. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - doas (senderman) - Easily prefix your current or previous commands with `doas` by pressing `ESC` twice. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - doas (senderman) - Easily prefix your current or previous commands with `doas` by pressing `ESC` twice. (Plugins / ZSH on Windows)
README
# doas-zsh-plugin
Easily prefix your current or previous commands with `doas` by pressing esc twice
This is fork of [OMZ's sudo plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo).
# Installation
Use [Antidote](https://getantidote.github.io/)
Add the following line to your plugins file:
```Senderman/doas-zsh-plugin```
## Usage
### Current typed commands
Say you have typed a long command and forgot to add `doas` in front:
```console
$ apt-get install build-essential
```By pressing the esc key twice, you will have the same command with `doas` prefixed without typing:
```console
$ doas apt-get install build-essential
```### Previous executed commands
Say you want to delete a system file and denied:
```console
$ rm some-system-file.txt
-su: some-system-file.txt: Permission denied
$
```By pressing the esc key twice, you will have the same command with `doas` prefixed without typing:
```console
$ rm some-system-file.txt
-su: some-system-file.txt: Permission denied
$ doas rm some-system-file.txt
Password:
$
```### doas is already in the beginning of the line
Say you already have doas in the beginning of the line:
```console
$ doas ls
```To remove it, press esc key twice:
```console
$ ls
```