about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-10-18 16:13:49 +0200
committerSoispha <soispha@vhack.eu>2023-10-18 16:13:49 +0200
commitb8ab1f5ff199f62d8844aa23f777e54ef9348c3c (patch)
tree31891dffae874b1820517102f2cb4037f11c6bf2
parentfix(hm/pkgs/scr/neorg): Silence 'task', when it can't find the rc element (diff)
downloadnixos-config-b8ab1f5ff199f62d8844aa23f777e54ef9348c3c.tar.gz
nixos-config-b8ab1f5ff199f62d8844aa23f777e54ef9348c3c.zip
fix(hm/pkgs/scr/neorg): Correctly cd to the project directory
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/neorg3
1 files changed, 2 insertions, 1 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/neorg b/hm/soispha/pkgs/scripts/wrappers/neorg
index 78f6f64c..2bdb82cf 100755
--- a/hm/soispha/pkgs/scripts/wrappers/neorg
+++ b/hm/soispha/pkgs/scripts/wrappers/neorg
@@ -46,7 +46,8 @@ open_current_task_context() {
         fi
 
         # Perform shell expansion of Tilde
-        nvim +cd "%DEFAULT_NEORG_PROJECT_DIR" "$(sed "s|~|$HOME|" "$(ptmp "%DEFAULT_NEORG_PROJECT_DIR/$context_path")")";
+        extended_neorg_project_dir="$(sed "s|~|$HOME|" "$(ptmp "%DEFAULT_NEORG_PROJECT_DIR")")";
+        (cd "$extended_neorg_project_dir" && nvim +edit "$extended_neorg_project_dir/$context_path";)
     else
         dbg "No context active";
         open_neorg_workspace_prompt;