Bashrc.wiki: Added triumph section

This commit is contained in:
David Thurstenson 2021-06-05 19:59:17 -05:00
parent 84c1bc6b43
commit eeea080dd9
1 changed files with 12 additions and 0 deletions

View File

@ -206,6 +206,18 @@ Both of these in tandem make beep tune writing way easier.
----
== Triumph ==
https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/triumph.bash
This function is both an example of how `sing()` is used, as well as a tool in its own right.
I wanted a script that played a tune after a long-running script, but play different tunes based on the exit code of the preceding command. This was my cute Portal-themed implementation of that idea.
Proper tune selection depends on `triumph()` being able to read the exit code from the previous command. For example, for usage in a one-liner script, use something similar to `<targetcmd>; triumph`. Avoid using `||` or `&&` in place of the `;`.
----
==Weechat==
https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/weechat.bash