You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 astring widthsubcommand is what is needed. By default it reports the cumulative width of each string one per line. With the-i/--individualflag it would report the width of each individual character in each string. With the-v/--verboseflag it would print a symbolic representation of each char and its width.This would allow you to type
string width \u009Cto 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.