Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
8b53d049
Unverified
Commit
8b53d049
authored
Dec 29, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(sudo): document key binding change
parent
8b231f2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
README.md
plugins/sudo/README.md
+15
-1
No files found.
plugins/sudo/README.md
View file @
8b53d049
# sudo
# sudo
Easily prefix your current or previous commands with
`sudo`
by pressing
<kbd>
esc
</kbd>
twice
Easily prefix your current or previous commands with
`sudo`
by pressing
<kbd>
esc
</kbd>
twice
.
To use it, add
`sudo`
to the plugins array in your zshrc file:
To use it, add
`sudo`
to the plugins array in your zshrc file:
...
@@ -43,3 +43,17 @@ $ sudo rm some-system-file.txt
...
@@ -43,3 +43,17 @@ $ sudo rm some-system-file.txt
Password:
Password:
$
$
```
```
## Key binding
By default, the
`sudo`
plugin uses
<kbd>
Esc
</kbd><kbd>
Esc
</kbd>
as the trigger.
If you want to change it, you can use the
`bindkey`
command to bind it to a different key:
```
sh
bindkey
-M
emacs
'<seq>'
sudo-command-line
bindkey
-M
vicmd
'<seq>'
sudo-command-line
bindkey
-M
viins
'<seq>'
sudo-command-line
```
where
`<seq>`
is the sequence you want to use. You can find the keyboard sequence
by running
`cat`
and pressing the keyboard combination you want to use.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment