Output VCSRevision with --version
This commit is contained in:
parent
d39036de2a
commit
20ad7ca437
@ -28,7 +28,7 @@ def main() -> None:
|
|||||||
os.environ.pop('KITTY_PREWARM_SOCKET')
|
os.environ.pop('KITTY_PREWARM_SOCKET')
|
||||||
os.execlp(sys.executable, sys.executable, '+launch', __file__, *sys.argv[1:])
|
os.execlp(sys.executable, sys.executable, '+launch', __file__, *sys.argv[1:])
|
||||||
with open('constants.go', 'w') as f:
|
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'''\
|
f.write(f'''\
|
||||||
// auto-generated by {__file__} do no edit
|
// auto-generated by {__file__} do no edit
|
||||||
|
|
||||||
|
|||||||
@ -329,7 +329,7 @@ func show_usage(cmd *cobra.Command) error {
|
|||||||
if cmd.Annotations["usage-suffix"] != "" {
|
if cmd.Annotations["usage-suffix"] != "" {
|
||||||
fmt.Fprintln(&output, cmd.Annotations["usage-suffix"])
|
fmt.Fprintln(&output, cmd.Annotations["usage-suffix"])
|
||||||
} else {
|
} 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()
|
output_text := output.String()
|
||||||
// fmt.Printf("%#v\n", output_text)
|
// fmt.Printf("%#v\n", output_text)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user