MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / cmdRename

Function cmdRename

apps/desktop/src/cli/commands/notes.ts:153–159  ·  view source on GitHub ↗
(vault: string, args: ParsedArgs)

Source from the content-addressed store, hash-verified

151}
152
153export async function cmdRename(vault: string, args: ParsedArgs): Promise<void> {
154 const rel = requirePath(args)
155 const to = getString(args, 'to')
156 if (!to) throw new Error('zn rename requires --to <new title>.')
157 const meta = await renameNote(vault, rel, to)
158 emitWritten(meta, args, 'Renamed')
159}
160
161export async function cmdMove(vault: string, args: ParsedArgs): Promise<void> {
162 const rel = requirePath(args)

Callers

nothing calls this directly

Calls 4

requirePathFunction · 0.85
getStringFunction · 0.85
emitWrittenFunction · 0.85
renameNoteFunction · 0.50

Tested by

no test coverage detected