about summary refs log tree commit diff stats
path: root/pkgs/by-name/ne/neorg/functions/add.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 11:48:44 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 11:48:44 +0200
commit135d09bfb305d54cac1ba1fb9861d5b9309a7b3a (patch)
tree459109a40320530993ae560f55a730a72df31416 /pkgs/by-name/ne/neorg/functions/add.sh
parentrefactor(modules/legacy/firefox): Move to by-name (diff)
downloadnixos-config-135d09bfb305d54cac1ba1fb9861d5b9309a7b3a.zip
feat(pkgs/neorg): Rewrite in rust
This improves upon neorg by integrating it better into the system
context.
Diffstat (limited to 'pkgs/by-name/ne/neorg/functions/add.sh')
-rw-r--r--pkgs/by-name/ne/neorg/functions/add.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/pkgs/by-name/ne/neorg/functions/add.sh b/pkgs/by-name/ne/neorg/functions/add.sh
deleted file mode 100644
index 5a830a10..00000000
--- a/pkgs/by-name/ne/neorg/functions/add.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env dash
-
-add0open_taskwarrior_project_file() {
-    task_project_file="%TASK_PROJECT_FILE"
-
-    cd "$(dirname $task_project_file)" || die "BUG: task_project_file ('$task_project_file') can't be accessed"
-
-    git_dir="$(search_flake_base_dir)"
-    [ "$git_dir" ] || die "(BUG): No git directory?"
-    cd "$git_dir" || die "Unreachable, this MUST exists"
-
-    nvim "$task_project_file"
-    git add "$task_project_file"
-
-    base_task_project_file_path="$(awk "{ gsub(\"$git_dir/\", \"\", \$0); print }" "$(ptmp "$task_project_file")")"
-    git add $task_project_file
-
-    # Check that only the project file has been added (and that our file is actually
-    # modified)
-    if git status --porcelain=v2 | awk -v path="$base_task_project_file_path" 'BEGIN { hit = 0 } { if ($2 ~ /A./ || $2 ~ /M./) { if ($NF ~ path) { hit = 1 } else { hit = 0; exit 1 } } } END { if (hit == 1) { exit 0 } else { exit 1 } }'; then
-        git commit --verbose --message="chore($(dirname "$base_task_project_file_path")): Update"
-    fi
-}