dnkl/foot
41
2.0k
Fork
You've already forked foot
243

dcs: xtgettcap: always reply with tigetstr(3) formatted "strings" #1703

Manually merged
dnkl merged 2 commits from xtgettcap-format into master 2024年05月01日 06:57:53 +02:00
Owner
Copy link

That is, instead of sometimes replying with a "source" encoded string (where e.g. \E are returned just like that, and not as an actual ESC), always un-escape all string values.

This also includes \n \r \t \b \f \s, \^ \\ \:, as well as ^x-styled escapes.

Closes #1701

That is, instead of sometimes replying with a "source" encoded string (where e.g. `\E` are returned just like that, and not as an actual `ESC`), always un-escape all string values. This also includes `\n` `\r` `\t` `\b` `\f` `\s`, `\^` `\\` `\:`, as well as `^x`-styled escapes. Closes #1701
dcs: xtgettcap: always reply with tigetstr(3) formatted "strings"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
a3debf7741
That is, instead of sometimes replying with a "source" encoded
string (where e.g. '\E' are returned just like that, and not as an
actual ESC), always unescape all string values.
This also includes \n \r \t \b \f \s, \^ \\ \ \:, as well as ^x-styled
escapes.
Closes #1701 
craigbarnes left a comment
Copy link

I haven't looked closely at the code, but the output in foot-terminfo.h looks good to me. 👍

The only minor thing I noticed was that the string literals for bel, cub1 and kbs contain raw control chars, but I suppose that doesn't matter for a generated header.

I haven't looked closely at the code, but the output in `foot-terminfo.h` looks good to me. 👍 The only minor thing I noticed was that the string literals for `bel`, `cub1` and `kbs` contain raw control chars, but I suppose that doesn't matter for a generated header.
scripts: generate-builtin-terminfo: use \xNN for control characters
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
3c4669061b
Instead of emitting raw control characters (for e.g. bel, cub1 and
kbs), use \xNN C string escapes.
Author
Owner
Copy link

The only minor thing I noticed was that the string literals for bel, cub1 and kbs contain raw control chars, but I suppose that doesn't matter for a generated header.

How about this: 3c4669061b ?

> The only minor thing I noticed was that the string literals for bel, cub1 and kbs contain raw control chars, but I suppose that doesn't matter for a generated header. How about this: https://codeberg.org/dnkl/foot/commit/3c4669061baadac105c274bd0d30aadb27b0b642 ?
Collaborator
Copy link

How about this: 3c4669061b ?

LGTM.

> How about this: 3c4669061b ? LGTM.
dnkl manually merged commit 3c4669061b into master 2024年05月01日 06:57:53 +02:00
@ -61,0 +57,4 @@
ctrl = m.group(1)
if ctrl == '?':
return '\\x7f'
return f'\\x{ord(ctrl) - ord('@'):02x}'
First-time contributor
Copy link

Hi,
I get -
SyntaxError: f-string: unmatched '('
from line 60, I think because of the s-quotes inside s-quotes ?
If I change outer to be d-quotes then its ok ?

Hi, I get - SyntaxError: f-string: unmatched '(' from line 60, I think because of the s-quotes inside s-quotes ? If I change outer to be d-quotes then its ok ?
First-time contributor
Copy link

Fixed in 3a7ea1f44b
thx!

Fixed in 3a7ea1f44b5cac16c4d67cddb75c02638d59c55c thx!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot!1703
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "xtgettcap-format"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?