Open samuelcolvin opened 6 years ago
I agree it should be added. But here it is using jq to parse json and yj to convert yml to json (so it can be parsed with jq). While less portable, it's a tad more elegant then regex:
papertrail-systems() {
curl -s -H "X-Papertrail-Token: `cat ~/.papertrail.yml | yj | jq --raw-output .token`" https://papertrailapp.com/api/v1/systems.json | jq --raw-output .[].name
}
currently I'm using
in my
.bashrc
file.But it was a faff to setup, would be greate if there was a simpler way of getting this.