helpers for capturing command outputs

This commit is contained in:
MorganGeek 2020-07-13 16:17:33 +02:00
parent fc337c6d85
commit 816fdb8d9b

View File

@ -455,6 +455,12 @@ function rssadd() {
newsboat
}
# Via https://stackoverflow.com/a/58598185/2309958
# capture the output of a command so it can be retrieved with ret
function cap () { tee /tmp/capture.out}
# return the output of the most recent command that was captured by cap
function ret () { \cat /tmp/capture.out }
# Package / Dependencies management helpers
function adhocbis() {
local ansible_output=$(adhoc "$*")