https://github.com/eth-p/fish-plugin-sudo
A fish plugin for better sudo integration.
https://github.com/eth-p/fish-plugin-sudo
fish fish-plugin fish-shell fisher fisherman oh-my-fish sudo
Last synced: about 1 month ago
JSON representation
A fish plugin for better sudo integration.
- Host: GitHub
- URL: https://github.com/eth-p/fish-plugin-sudo
- Owner: eth-p
- License: mit
- Created: 2018-09-25T07:33:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-11T14:32:06.000Z (about 1 year ago)
- Last Synced: 2025-03-02T04:51:20.037Z (2 months ago)
- Topics: fish, fish-plugin, fish-shell, fisher, fisherman, oh-my-fish, sudo
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Improved Sudo for Fish Shell
An improved `sudo` command for fish shell.
## Features
**Enter a superuser shell with a single word.**
No fiddling with environment variables or having to type `sudo fish`.
Just type `sudo` and press enter!```fish
sudo
```**Press CTRL+S to toggle between a sudo and non-sudo command.**
One of the most convenient features of bash is the `sudo !!` substitution.
While fish may not support `!!`, it can do one better with key bindings.If you run a command and find out you need to run it as a superuser, simply press UP and CTRL+S to get that command with the word sudo in front of it.
```fish
apt-get update # No permission.
sudo apt-get update # After pressing UP and CTRL+S.
```## Install
With [fisher](https://github.com/jorgebucaran/fisher):
```fish
fisher install eth-p/fish-plugin-sudo
```### Hotkey Support
The Ctrl+S hotkey is not added by default. In order to bind the hotkey, add the following to your `config.fish` file:
```fish
bind \cs '__ethp_commandline_toggle_sudo.fish'
```