diff --git a/README.asciidoc b/README.asciidoc index 200c0de1..73b13406 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -1102,6 +1102,7 @@ contain some special data: * `.` (`dot`): current selection contents * `#` (`hash`): selection indices (first selection has 1, second has 2, ...) * `_` (`underscore`): null register, always empty + * `:` (`colon`): last entered command Default registers ^^^^^^^^^^^^^^^^^ diff --git a/doc/manpages/registers.asciidoc b/doc/manpages/registers.asciidoc index 8b417a36..cc81bb06 100644 --- a/doc/manpages/registers.asciidoc +++ b/doc/manpages/registers.asciidoc @@ -65,6 +65,9 @@ contain some special data *_* (underscore):: null register, always empty +*:* (colon):: + last entered command + Integer registers ----------------- Registers *1* to *9* hold the grouped sub-matches of the regular diff --git a/src/register_manager.cc b/src/register_manager.cc index ff8cd1ba..815d5d4c 100644 --- a/src/register_manager.cc +++ b/src/register_manager.cc @@ -20,7 +20,8 @@ Register& RegisterManager::operator[](StringView reg) const { "percent", '%' }, { "dot", '.' }, { "hash", '#' }, - { "underscore", '_' } + { "underscore", '_' }, + { "colon", ':' } }; auto it = reg_names.find(reg); if (it == reg_names.end())