Compare commits
2
Commits
v0.1.9
...
4ca4a516ae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ca4a516ae
|
||
|
|
f616651c49
|
No files matched your search
@@ -302,7 +302,7 @@ _branch=feat/file-manager-panel
|
|||||||
### Publication automatique
|
### Publication automatique
|
||||||
|
|
||||||
`version`, à la racine, est la source de vérité des releases. Il suit la version
|
`version`, à la racine, est la source de vérité des releases. Il suit la version
|
||||||
du fork FWS (`0.1.9`), pas la version amont de kitty embarquée dans le paquet :
|
du fork FWS (`0.1.10`), pas la version amont de kitty embarquée dans le paquet :
|
||||||
c'est elle qui nomme le tag, la release et le paquet
|
c'est elle qui nomme le tag, la release et le paquet
|
||||||
`fws-kitty-<version>-<rel>`. Il doit rester égal à `pkgver` dans
|
`fws-kitty-<version>-<rel>`. Il doit rester égal à `pkgver` dans
|
||||||
`packaging/PKGBUILD` et à la version affichée par `fws-kitty`
|
`packaging/PKGBUILD` et à la version affichée par `fws-kitty`
|
||||||
|
|||||||
+2
-1
@@ -31,7 +31,8 @@ Search scrollback in place :sc:`search_scrollback_prompt`
|
|||||||
|
|
||||||
The in-place search highlights every match without replacing the screen with a
|
The in-place search highlights every match without replacing the screen with a
|
||||||
pager. Prefix the query with ``\c`` to match case sensitively and with ``\r``
|
pager. Prefix the query with ``\c`` to match case sensitively and with ``\r``
|
||||||
to use a regular expression; both modifiers can be combined. While the search
|
to use a regular expression; both modifiers can be combined. Write a doubled
|
||||||
|
backslash (``\\c``, ``\\r``) to search for those prefixes literally. While the search
|
||||||
is active, :kbd:`n` jumps to the next match, :kbd:`N` to the previous one and
|
is active, :kbd:`n` jumps to the next match, :kbd:`N` to the previous one and
|
||||||
:kbd:`Escape` ends it. The ``[current/total]`` counter is shown in the window
|
:kbd:`Escape` ends it. The ``[current/total]`` counter is shown in the window
|
||||||
title and matches use the first marker color (see :opt:`mark1_foreground`).
|
title and matches use the first marker color (see :opt:`mark1_foreground`).
|
||||||
|
|||||||
+3
-2
@@ -277,8 +277,9 @@ Detailed list of changes
|
|||||||
highlights every match without opening the pager, shows the
|
highlights every match without opening the pager, shows the
|
||||||
:code:`[current/total]` counter in the window title and moves between matches
|
:code:`[current/total]` counter in the window title and moves between matches
|
||||||
with :kbd:`n` and :kbd:`N`. Prefix the query with :code:`\c` for a case
|
with :kbd:`n` and :kbd:`N`. Prefix the query with :code:`\c` for a case
|
||||||
sensitive search and :code:`\r` for a regular expression. See
|
sensitive search and :code:`\r` for a regular expression; write a doubled
|
||||||
:doc:`basic` for the details.
|
backslash (:code:`\\c`, :code:`\\r`) to search for those prefixes literally.
|
||||||
|
See :doc:`basic` for the details.
|
||||||
|
|
||||||
- A configurable :opt:`leader` key now opens a which-key panel listing every
|
- A configurable :opt:`leader` key now opens a which-key panel listing every
|
||||||
multi-key mapping available under that prefix, without waiting for a timeout.
|
multi-key mapping available under that prefix, without waiting for a timeout.
|
||||||
|
|||||||
@@ -424,10 +424,10 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) {
|
|||||||
if (get_bool_cli_val(cli_spec, "version")) {
|
if (get_bool_cli_val(cli_spec, "version")) {
|
||||||
if (isatty(STDOUT_FILENO)) {
|
if (isatty(STDOUT_FILENO)) {
|
||||||
printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION);
|
printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION);
|
||||||
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.9\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.10\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
||||||
} else {
|
} else {
|
||||||
printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION);
|
printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION);
|
||||||
printf("fws-kitty 0.1.9 by BlackAngelTV\n");
|
printf("fws-kitty 0.1.10 by BlackAngelTV\n");
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
The query parser and the matcher live here, away from the screen code, so that
|
The query parser and the matcher live here, away from the screen code, so that
|
||||||
they can be tested without a running terminal. A query can start with two
|
they can be tested without a running terminal. A query can start with two
|
||||||
modifiers, in any order: ``\\c`` makes matching case sensitive and ``\\r``
|
modifiers, in any order: ``\\c`` makes matching case sensitive and ``\\r``
|
||||||
treats the query as a regular expression.
|
treats the query as a regular expression. A doubled backslash escapes the
|
||||||
|
modifier syntax, so that the two prefixes can be searched for literally.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -57,6 +58,11 @@ def parse_query(raw: str) -> Query:
|
|||||||
case_sensitive = is_regex = False
|
case_sensitive = is_regex = False
|
||||||
while len(text) > 1 and text[0] == '\\':
|
while len(text) > 1 and text[0] == '\\':
|
||||||
modifier = text[1].lower()
|
modifier = text[1].lower()
|
||||||
|
if modifier == '\\':
|
||||||
|
# A doubled backslash stands for a literal one and ends the modifier
|
||||||
|
# section, which is the only way to search for \c or \r themselves.
|
||||||
|
text = text[1:]
|
||||||
|
break
|
||||||
if modifier == CASE_SENSITIVE_MODIFIER:
|
if modifier == CASE_SENSITIVE_MODIFIER:
|
||||||
case_sensitive = True
|
case_sensitive = True
|
||||||
elif modifier == REGEX_MODIFIER:
|
elif modifier == REGEX_MODIFIER:
|
||||||
|
|||||||
+6
-2
@@ -2676,7 +2676,8 @@ class Window:
|
|||||||
'sc',
|
'sc',
|
||||||
"""
|
"""
|
||||||
Search the scrollback in place, highlighting every match. Prefix the query with \\c for a case
|
Search the scrollback in place, highlighting every match. Prefix the query with \\c for a case
|
||||||
sensitive search and with \\r for a regular expression. Matches are navigated with n and N and
|
sensitive search and with \\r for a regular expression. To search for those two strings literally,
|
||||||
|
write a double backslash instead (``\\\\c`` and ``\\\\r``). Matches are navigated with n and N and
|
||||||
the search ends with Escape. The [current/total] counter is shown in the window title.
|
the search ends with Escape. The [current/total] counter is shown in the window title.
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
@@ -2691,7 +2692,10 @@ class Window:
|
|||||||
self.clear_scrollback_search()
|
self.clear_scrollback_search()
|
||||||
|
|
||||||
get_boss().get_line(
|
get_boss().get_line(
|
||||||
_('Search the scrollback. Prefix the query with \\c for a case sensitive search and \\r for a regular expression.'),
|
_(
|
||||||
|
'Search the scrollback. Prefix the query with \\c for a case sensitive search and \\r for a regular expression.'
|
||||||
|
' Write a double backslash to search for those strings literally.'
|
||||||
|
),
|
||||||
done,
|
done,
|
||||||
window=self,
|
window=self,
|
||||||
prompt=_('search> '),
|
prompt=_('search> '),
|
||||||
|
|||||||
@@ -46,6 +46,25 @@ class TestScrollbackSearch(BaseTest):
|
|||||||
with self.assertRaises(InvalidQuery):
|
with self.assertRaises(InvalidQuery):
|
||||||
compile_query(parse_query('\\r ('))
|
compile_query(parse_query('\\r ('))
|
||||||
|
|
||||||
|
def test_parse_query_escaped_backslash(self):
|
||||||
|
# A doubled backslash searches text starting with a backslash instead of
|
||||||
|
# being read as a modifier, so both modifier prefixes remain reachable.
|
||||||
|
for raw, expected in (('\\\\c', '\\c'), ('\\\\r', '\\r'), ('\\\\C', '\\C'), ('\\\\', '\\')):
|
||||||
|
with self.subTest(raw=raw):
|
||||||
|
q = parse_query(raw)
|
||||||
|
self.ae((q.text, q.case_sensitive, q.is_regex), (expected, False, False))
|
||||||
|
|
||||||
|
# Modifiers still combine with an escaped prefix in the searched text
|
||||||
|
q = parse_query('\\c\\\\r')
|
||||||
|
self.ae((q.text, q.case_sensitive, q.is_regex), ('\\r', True, False))
|
||||||
|
|
||||||
|
# The escaped prefix is matched like any other text, case insensitively
|
||||||
|
# by default, and the case sensitive modifier still applies to it.
|
||||||
|
matches = find_matches(['a \\c b', 'a \\C b'], parse_query('\\\\c'))
|
||||||
|
self.ae([(m.line, m.start, m.end) for m in matches], [(0, 2, 4), (1, 2, 4)])
|
||||||
|
matches = find_matches(['a \\c b', 'a \\C b'], parse_query('\\c\\\\c'))
|
||||||
|
self.ae([(m.line, m.start, m.end) for m in matches], [(0, 2, 4)])
|
||||||
|
|
||||||
def test_find_matches_plain(self):
|
def test_find_matches_plain(self):
|
||||||
lines = ['needle at start', 'Needle again', 'nothing', 'a needle here']
|
lines = ['needle at start', 'Needle again', 'nothing', 'a needle here']
|
||||||
matches = find_matches(lines, parse_query('needle'))
|
matches = find_matches(lines, parse_query('needle'))
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
pkgname=fws-kitty
|
pkgname=fws-kitty
|
||||||
# Fork version from the version file: it names the release and the package.
|
# Fork version from the version file: it names the release and the package.
|
||||||
# The upstream kitty release built inside is tracked by _kittyver below.
|
# The upstream kitty release built inside is tracked by _kittyver below.
|
||||||
pkgver=0.1.9
|
pkgver=0.1.10
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
|
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ func ShowError(err error) {
|
|||||||
|
|
||||||
func (self *Command) version_string(formatter *markup.Context) string {
|
func (self *Command) version_string(formatter *markup.Context) string {
|
||||||
return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) +
|
return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) +
|
||||||
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.9"), "by", formatter.Title("BlackAngelTV"))
|
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.10"), "by", formatter.Title("BlackAngelTV"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Command) ShowVersion() {
|
func (self *Command) ShowVersion() {
|
||||||
|
|||||||
Reference in new issue
Block a user