From 60ceeff5dc8aad2779cdada335f180833d659bad Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Thu, 4 Aug 2022 17:53:53 -0400 Subject: [PATCH] docs: examples for better sudo and shell history picker --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index ccff10b..3408c0e 100644 --- a/README.md +++ b/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!