mirror of
https://github.com/charmbracelet/gum
synced 2024-05-15 20:56:41 +02:00
docs: examples for better sudo and shell history picker
This commit is contained in:
parent
6aee67259c
commit
60ceeff5dc
18
README.md
18
README.md
|
@ -438,6 +438,24 @@ List all PRs for the current GitHub repository and checkout the chosen PR (using
|
|||
gh pr list | cut -f1,2 | gum choose | cut -f1 | xargs gh pr checkout
|
||||
```
|
||||
|
||||
#### Pick command from shell history
|
||||
|
||||
Pick a previously executed command from your shell history to execute, copy,
|
||||
edit, etc...
|
||||
|
||||
```bash
|
||||
gum filter < $HISTFILE --height 20
|
||||
```
|
||||
|
||||
#### Sudo password input
|
||||
|
||||
See visual feedback when entering password with masked characters with `gum
|
||||
input --password`.
|
||||
|
||||
```bash
|
||||
alias please="gum input --password | sudo -nS"
|
||||
```
|
||||
|
||||
## Feedback
|
||||
|
||||
We’d love to hear your thoughts on this project. Feel free to drop us a note!
|
||||
|
|
Loading…
Reference in a new issue