xwmx / nb

CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
https://xwmx.github.io/nb
GNU Affero General Public License v3.0
6.64k stars 188 forks source link

Extend _GIT_ENABLED Support to Note/Todo Deletions in nb CLI #290

Open mweichert opened 10 months ago

mweichert commented 10 months ago

This pull request introduces an enhancement to the nb CLI's handling of note and todo deletions, specifically in the context of the _GIT_ENABLED environment variable. The nb CLI already incorporates the _GIT_ENABLED variable, which, when set to a non-empty string, disables the use of GIT for its operations. This change extends that functionality to the deletion process of notes and todos.

Key Changes:

Impact:

This change enhances the nb CLI's flexibility and control in environments where GIT usage might be restricted or not preferred. It allows users to leverage the full capabilities of nb without relying on GIT, aligning with scenarios where a simpler or more streamlined workflow is desired.

Testing:

This update is a step forward in making the nb CLI more adaptable to various user environments and preferences. Your review and feedback on this implementation are highly appreciated.

nsmmrs commented 2 months ago

I wanted to clarify where in the code the _GIT_ENABLED variable is being set?

It's initialized here. However, the supported values are 0 and 1, so I'm not sure if these changes would work as expected.