add kak_timestamp env var to access current buffer timestamp
This commit is contained in:
parent
8cc9a44d47
commit
4db6e3e917
|
@ -737,6 +737,9 @@ void register_env_vars()
|
||||||
shell_manager.register_env_var("bufname",
|
shell_manager.register_env_var("bufname",
|
||||||
[](const String& name, const Context& context)
|
[](const String& name, const Context& context)
|
||||||
{ return context.buffer().name(); });
|
{ return context.buffer().name(); });
|
||||||
|
shell_manager.register_env_var("timestamp",
|
||||||
|
[](const String& name, const Context& context)
|
||||||
|
{ return int_to_str(context.buffer().timestamp()); });
|
||||||
shell_manager.register_env_var("selection",
|
shell_manager.register_env_var("selection",
|
||||||
[](const String& name, const Context& context)
|
[](const String& name, const Context& context)
|
||||||
{ return context.editor().selections_content().back(); });
|
{ return context.editor().selections_content().back(); });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user