From f311c01a1b2672ab2c724674de8022e83988545e Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Fri, 27 Dec 2024 14:37:58 +0100 Subject: reorganize --- zsh/extras.zsh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 zsh/extras.zsh (limited to 'zsh/extras.zsh') diff --git a/zsh/extras.zsh b/zsh/extras.zsh new file mode 100755 index 0000000..0647ca0 --- /dev/null +++ b/zsh/extras.zsh @@ -0,0 +1,28 @@ +NOTES_DIR=$HOME/ghq/github.com/simenandre/notes/ +function note() { + if [ $1 ]; then + FILE=$NOTES_DIR/$(date +%Y-%m-%d).md + + if [ $2 ]; then + FILE=$2 + fi + + echo $1 >> $FILE + fi +} + +function nt() { + if [ $1 ]; then + CONTENT="- [ ] $1" + note $CONTENT $2 + fi +} + +function getBjerkIssues() { + gh issue list --repo bjerkio/internal \ + --search "-label:backlog -label:kind/system" \ + --json title,body,url,createdAt,assignees,number,labels,comments \ + --jq 'map({url, createdAt, title, labels: [.labels[].name], assignees: [.assignees[].login], body, number: "#\(.number)", comments: .comments | map({ body: .body, createdAt: .createdAt })})' +} + + -- cgit v1.2.3