diff --git a/Bashrc.wiki b/Bashrc.wiki index 8ac32d1..88ebf0e 100644 --- a/Bashrc.wiki +++ b/Bashrc.wiki @@ -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 `; triumph`. Avoid using `||` or `&&` in place of the `;`. + +---- + ==Weechat== https://git.thurstylark.com/vcsh/bashrc.git/tree/.bashrc.d/weechat.bash