From 86ce2abd6e7906ba9c11570db1938aefcce413f2 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 13 Jan 2022 14:47:59 -0800 Subject: [PATCH 01/15] zsh: add ned --- .config/shell/bin/ned | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 .config/shell/bin/ned diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned new file mode 100755 index 0000000..3edf8df --- /dev/null +++ b/.config/shell/bin/ned @@ -0,0 +1,23 @@ +#!/bin/bash +# NEd: Note Editor (and your best friend!) +# Ned can edit and create notes in a folder you tell him to! + +NOTES_DIR="$HOME/Documents/college/2y/2q/" + +[ -d "$NOTES_DIR"/misc ] && mkdir "$NOTES_DIR/misc" + +# Create misc note if blank +if [ -z "$1" ]; then + "$EDITOR" "$NOTES_DIR/unsorted/$(date)" + zsh +fi + +# Parse arguments +case "$1" in + # create and edit new note + 'new'|'n') "$EDITOR" "$NOTES_DIR"/*"$2"*/notes/"$3";; + # edit ned + 'e') "$EDITOR" "$(realpath "$0")";; + *) echo "no such option";; +esac + From eccae5b2622ba0deb58eaa7189852d54e7c0d924 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 13 Jan 2022 17:59:21 -0800 Subject: [PATCH 02/15] zsh: add sced (script edit) --- .config/shell/bin/sced | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .config/shell/bin/sced diff --git a/.config/shell/bin/sced b/.config/shell/bin/sced new file mode 100755 index 0000000..1b12f26 --- /dev/null +++ b/.config/shell/bin/sced @@ -0,0 +1,21 @@ +#!/bin/bash +# sced (script edit) edit a script or function that's somewhere inside the shell configuration +# Usage: bined