Skip to content

Commit fcdb50d

Browse files
authored
Merge pull request #20 from codevogel/dev
Update README.md
2 parents f860b1c + e466296 commit fcdb50d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Run your most frequently used commands with ease, e.g. `pls test` to run tests,
4545
- [Operation Flags](#operation-flags)
4646
- [Other Flags](#other-flags)
4747
- [Examples](#examples)
48+
- [Real World Examples](#real-world-examples)
4849
- [Execute commands in the main shell](#execute-commands-in-the-main-shell)
4950
- [If your main shell is bash](#if-your-main-shell-is-bash)
5051
- [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
187188

188189
View [`EXAMPLES.md` (here)](EXAMPLES.md) to see some examples of how to use commands that `pls` provides.
189190

191+
#### Real World Examples
192+
193+
Given the following `.pls.yml`:
194+
195+
```yml
196+
commands:
197+
- alias: nvimconf
198+
command: |
199+
cd ~/.config/nvim/lua
200+
- alias: bright
201+
command: |
202+
sudo brightnessctl set $1
203+
- alias: se
204+
command: |
205+
$1 &
206+
disown
207+
exit
208+
```
209+
210+
We can now run the following commands:
211+
212+
```
213+
# Sets the display brightness to 100%
214+
$ pls bright 100%
215+
216+
## The following two commands require you to 'Execute commands in the main shell' (see next section).
217+
218+
# Takes you to a frequently used directory (in this case ~/.config/nvim/lua)
219+
$ plz nvimconf
220+
221+
# Launches <executable>, disowns the process from the shell, and then closes the terminal.
222+
$ plz se <executable>
223+
```
224+
225+
190226
## Execute commands in the main shell
191227

192228
### If your main shell is bash

0 commit comments

Comments
 (0)