Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anatolykopyl/doas-zsh-plugin
Binds double escape to add doas before the command
https://github.com/anatolykopyl/doas-zsh-plugin
doas doas-zsh-plugin oh-my-zsh oh-my-zsh-plugin zsh zsh-plugin
Last synced: about 1 month ago
JSON representation
Binds double escape to add doas before the command
- Host: GitHub
- URL: https://github.com/anatolykopyl/doas-zsh-plugin
- Owner: anatolykopyl
- License: mit
- Created: 2020-08-12T23:51:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-17T10:25:53.000Z (over 4 years ago)
- Last Synced: 2024-05-21T06:08:24.951Z (8 months ago)
- Topics: doas, doas-zsh-plugin, oh-my-zsh, oh-my-zsh-plugin, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# doas-zsh-plugin
Easily prefix your current or previous commands with `doas` by pressing esc twice
To use it, run the following command:
```console
$ git clone https://github.com/anatolykopyl/doas-zsh-plugin.git $HOME/.oh-my-zsh/custom/plugins/doas
```## 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:
$
```Plugin inspired by sudo plugin by [Dongweiming](https://github.com/dongweiming)