navid/veins / commit
9f12d74de39a
Navid M <navidmomtahen@gmail.com> · 2026-11-26
parents: 6a679de23c72
Browse files at this commit · Download source
--- a/veins/src/cli/bookmark_cmd.sx+++ b/veins/src/cli/bookmark_cmd.sx@@ -1,6 +1,6 @@-/// `vn bookmark`: manage named, movable pointers (branches).+/// `vn bmk`: manage named, movable pointers (branches). ///-/// Bookmarks are the branching primitive. `vn bookmark set <name>` creates or+/// Bookmarks are the branching primitive. `vn bmk set <name>` creates or /// moves one, `vn new <name>` starts a change on top of it, and `vn co <name>` /// switches the working copy to it. Rewriting a working-copy commit (through a /// snapshot, `describe`, or `rm`) moves any bookmark that named that commit.@@ -213,7 +213,7 @@ rev = bytes.from_cstr(a) } else { msg.error_prefix()- stdio.eprint("bookmark set accepts a name and one revision\n", {})+ stdio.eprint("bmk set accepts a name and one revision\n", {}) return 1 } }@@ -222,7 +222,7 @@ } if name.len == 0 { msg.error_prefix()- stdio.eprint("bookmark set requires a name\n", {})+ stdio.eprint("bmk set requires a name\n", {}) return 1 } if !valid_bookmark_name(name) {@@ -341,7 +341,7 @@ } else { if name.len > 0 { msg.error_prefix()- stdio.eprint("bookmark delete accepts exactly one name\n", {})+ stdio.eprint("bmk delete accepts exactly one name\n", {}) return 1 } name = bytes.from_cstr(a)@@ -351,7 +351,7 @@ } if name.len == 0 { msg.error_prefix()- stdio.eprint("bookmark delete requires a name\n", {})+ stdio.eprint("bmk delete requires a name\n", {}) return 1 } @@ -415,7 +415,7 @@ return 1 } else { msg.error_prefix()- stdio.eprint("bookmark list takes no operands\n", {})+ stdio.eprint("bmk list takes no operands\n", {}) return 1 } }@@ -528,7 +528,7 @@ } fn usage() void = trust {- stdio.puts("usage: vn bookmark <set|list|delete> ...")+ stdio.puts("usage: vn bmk <set|list|delete> ...") stdio.puts("") stdio.puts("manage named, movable pointers to commits (branches)") stdio.puts("")@@ -601,7 +601,7 @@ return 0 } msg.error_prefix()- stdio.eprint("unknown bookmark subcommand: {s}\n", {str.from_cstr(sub)})+ stdio.eprint("unknown bmk subcommand: {s}\n", {str.from_cstr(sub)}) usage() return 1 }--- a/veins/src/cli/help_cmd.sx+++ b/veins/src/cli/help_cmd.sx@@ -21,7 +21,7 @@ stdio.puts(" show show a commit and its diff") stdio.puts(" diff show a unified diff") stdio.puts(" new start a new change")- stdio.puts(" bookmark manage named branch pointers")+ stdio.puts(" bmk manage named branch pointers") stdio.puts(" rm untrack paths, keeping files on disk by default") stdio.puts(" ex add paths or globs to .vnexclude") stdio.puts(" desc set the working-copy commit message; alias: describe")@@ -152,7 +152,7 @@ } fn show_bookmark() void = trust {- stdio.puts("usage: vn bookmark <set|list|delete> ...")+ stdio.puts("usage: vn bmk <set|list|delete> ...") stdio.puts("") stdio.puts("manage named, movable pointers to commits (branches)") stdio.puts("")@@ -163,7 +163,7 @@ stdio.puts(" delete <name> delete a bookmark") stdio.puts("") stdio.puts("examples:")- stdio.puts(" vn bookmark set main")+ stdio.puts(" vn bmk set main") stdio.puts(" vn new main") stdio.puts(" vn co main") }@@ -287,7 +287,7 @@ show_diff() return 0 }- if cmd_is(cmd, c"bookmark", 8) || cmd_is(cmd, c"bookmarks", 9) {+ if cmd_is(cmd, c"bmk", 3) { show_bookmark() return 0 }--- a/veins/src/main.sx+++ b/veins/src/main.sx@@ -519,7 +519,7 @@ if cmd_is(cmd, c"rm", 2) { return rm_cmd.run(args, 2) }- if cmd_is(cmd, c"bookmark", 8) || cmd_is(cmd, c"bookmarks", 9) {+ if cmd_is(cmd, c"bmk", 3) { return bookmark_cmd.run(args, 2) } if cmd_is(cmd, c"ex", 2) {