Merged
Conversation
- add-vault: register a vault directory, with --set-default flag - remove-vault: unregister a vault by name or path - list-vaults: mark default vault, add --default flag replacing print-default - set-default renamed to set-default-vault - print-default and set-default kept as deprecated commands (stderr warning) Closes #117
- remove dead code in ClearDefaultIfMatch - RemoveVault returns resolved vault name so ClearDefaultIfMatch works when removing by path - consistent newline in list-vaults --default --path-only - move sd alias to set-default-vault - add test for formatVaultsTable with default marker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add-vaultandremove-vaultcommands for registering/unregistering vaults from the CLI, enabling headless workflows without manually editingobsidian.json(”list-vaults“ means “lists all registered Obsidian vaults”, but no command show how resgister vault #117)set-defaulttoset-default-vaultand consolidatesprint-defaultintolist-vaults --defaultlist-vaultsnow marks the default vault with(default)in table outputset-default,print-default) still work but print a deprecation warning to stderr so existing scripts/pipes are unaffectedNew commands
add-vault <path>add-vault <path> --set-defaultremove-vault <name|path>list-vaults --defaultlist-vaults --default --path-onlyprint-default --path-only)set-default-vaultset-defaultDeprecated commands
set-defaultset-default-vaultprint-defaultlist-vaults --defaultCloses #117
Test plan
AddVaultandRemoveVault(path validation, duplicates, removal by name/path)list-vaultsandset-defaulttests updated and passingadd-vault,remove-vault,list-vaults --defaulton a real vault