From 20ad7ca43776788d5555ea1b6127cb12f4e3590c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 16 Aug 2022 21:26:55 +0530 Subject: [PATCH] Output VCSRevision with --version --- gen-rc-go.py | 2 +- tools/cli/infrastructure.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen-rc-go.py b/gen-rc-go.py index 4e03f71c3..e6ac91eda 100755 --- a/gen-rc-go.py +++ b/gen-rc-go.py @@ -28,7 +28,7 @@ def main() -> None: os.environ.pop('KITTY_PREWARM_SOCKET') os.execlp(sys.executable, sys.executable, '+launch', __file__, *sys.argv[1:]) with open('constants.go', 'w') as f: - dp = ", ".join(map(lambda x: f'"{serialize_as_go_string}"', kc.default_pager_for_help)) + dp = ", ".join(map(lambda x: f'"{serialize_as_go_string(x)}"', kc.default_pager_for_help)) f.write(f'''\ // auto-generated by {__file__} do no edit diff --git a/tools/cli/infrastructure.go b/tools/cli/infrastructure.go index c8dc5c265..f6ba8d187 100644 --- a/tools/cli/infrastructure.go +++ b/tools/cli/infrastructure.go @@ -329,7 +329,7 @@ func show_usage(cmd *cobra.Command) error { if cmd.Annotations["usage-suffix"] != "" { fmt.Fprintln(&output, cmd.Annotations["usage-suffix"]) } else { - fmt.Fprintln(&output, italic_fmt(RootCmd.Name()), opt_fmt(RootCmd.Version), "created by", title_fmt("Kovid Goyal")) + fmt.Fprintln(&output, italic_fmt(RootCmd.Name()), opt_fmt(kitty.VersionString), "created by", title_fmt("Kovid Goyal")) } output_text := output.String() // fmt.Printf("%#v\n", output_text)