From 0f4b98c2adc413c2b63c1b2a79b362b4dfeb4830 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Wed, 13 Jul 2022 16:26:58 -0400 Subject: [PATCH] docs(demos): Add editor and commit demos --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fa7c945..6f47ae7 100644 --- a/README.md +++ b/README.md @@ -198,16 +198,6 @@ See the [examples](./examples/) directory for more real world use cases. How to use `gum` in your daily workflows: -#### Open files in your `$EDITOR` - -By default `gum filter` will display a list of all files (searched recursively) -through your current directory, it has some sensible ignored defaults (`.git`, -`node_modules`). You can use this to pick a file and open it in your `$EDITOR`. - -```bash -$EDITOR $(gum filter) -``` - #### Write a commit message Prompt for user input to write git commit messages with a short summary and @@ -222,6 +212,18 @@ git commit -m "$(gum input --width 50 --placeholder "Summary of changes")" \ -m "$(gum write --width 80 --placeholder "Details of changes")" ``` +Running the ./examples/commit.sh script to commit to git + +#### Open files in your `$EDITOR` + +By default `gum filter` will display a list of all files (searched recursively) +through your current directory, it has some sensible ignored defaults (`.git`, +`node_modules`). You can use this to pick a file and open it in your `$EDITOR`. + +```bash +$EDITOR $(gum filter) +``` + #### Connect to a TMUX session Pick from a running `TMUX` session and attach to it if not inside `TMUX` or