Skip to content

Commit

Permalink
feat: Add tag-split function to split AWS resource tags into one tag …
Browse files Browse the repository at this point in the history
…per line
  • Loading branch information
mbailey committed Nov 6, 2024
1 parent 35eef03 commit e8d361d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ site/
*.swp
cloudformation/stars2.yml
lib/extras/github-functions
.aider*
.env
6 changes: 6 additions & 0 deletions lib/tag-functions
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ tag-values() {
--query "TagValues[].['$key', @]" |
sort
}

tag-split() {
# Split AWS resource tags into one tag per line
# Usage: bma instances | tail -1 | bma instance-tags | tag-split
sed 's/ \([^= ]*=\)/\n\1/g'
}

0 comments on commit e8d361d

Please sign in to comment.