From e466296d79e12ef2c5168bf177711caf14671973 Mon Sep 17 00:00:00 2001 From: Kamiel de Visser Date: Wed, 26 Mar 2025 10:53:57 +0100 Subject: [PATCH] Update README.md --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 293cf98..d266319 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Run your most frequently used commands with ease, e.g. `pls test` to run tests, - [Operation Flags](#operation-flags) - [Other Flags](#other-flags) - [Examples](#examples) + - [Real World Examples](#real-world-examples) - [Execute commands in the main shell](#execute-commands-in-the-main-shell) - [If your main shell is bash](#if-your-main-shell-is-bash) - [If your main shell is not bash](#if-your-main-shell-is-not-bash) @@ -187,6 +188,41 @@ These are the flags that do not represent operations. Some of them are used to p View [`EXAMPLES.md` (here)](EXAMPLES.md) to see some examples of how to use commands that `pls` provides. +#### Real World Examples + +Given the following `.pls.yml`: + +```yml +commands: + - alias: nvimconf + command: | + cd ~/.config/nvim/lua + - alias: bright + command: | + sudo brightnessctl set $1 + - alias: se + command: | + $1 & + disown + exit +``` + +We can now run the following commands: + +``` +# Sets the display brightness to 100% +$ pls bright 100% + +## The following two commands require you to 'Execute commands in the main shell' (see next section). + +# Takes you to a frequently used directory (in this case ~/.config/nvim/lua) +$ plz nvimconf + +# Launches , disowns the process from the shell, and then closes the terminal. +$ plz se +``` + + ## Execute commands in the main shell ### If your main shell is bash