Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add a string width subcommand #4012

Copy link
Copy link

Description

@krader1961
Issue body actions

When issues like #3989 and #4011 are opened I frequently find myself hacking a fish binary to tell me what fish_wcswidth() returns for the non-ASCII characters. There really should be a standard mechanism for getting that information. It seems like a string width subcommand is what is needed. By default it reports the cumulative width of each string one per line. With the -i / --individual flag it would report the width of each individual character in each string. With the -v / --verbose flag it would print a symbolic representation of each char and its width.

This would allow you to type string width \u009C to learn that fish thinks that char has width -1 (i.e., the width is undefined).

The first implementation would not support ANSI X3.64 escape sequences. So it couldn't be used to determine the "visual" width of something like the output of fish_prompt. That's an enhancement we might add in the future.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.