Fish-shell: UTF-8语言环境在DragonFly BSD,FreeBSD 11、12上不起作用

创建于 2016-05-21  ·  60评论  ·  资料来源: fish-shell/fish-shell

当把这样的行:
set LANG zh_CN.UTF-8
到.config / fish / config.fish
如果命令错误,则无法删除任何字符。

例如:

美食

我想为命令“ cat”删除“ e”
但不能删除任何字符
在2.2.0下可以。


鱼版本:鱼,版本2.3.0

操作系统:DragonFly testdf.com 4.4-发布DragonFly v4.4.1.18.gc5db8-RELEASE#0:2016年1月28日星期四15:02:10 CST 2016 [email protected] :/ usr / obj / usr / src / sys / lhmwzy x86_64

终端或终端仿真器:xterm

最有用的评论

我已经打开了这个FreeBSD错误。 我们仍然需要解决这个坏的实现。

所有60条评论

您按哪个键? 退格键?

如果是这样,请运行bind -k backspace找出设置为的内容,然后运行例如script (或bash并按ctrl + v),然后按键找出顺序它发送。 (默认情况下,脚本会将该会话的整个输出放入当前目录中的一个名为“ typescript”的文件中)。 Xterm应该发送“ \ cH”,这条鱼应该(通过terminfo,正确设置_needs_ $ TERM)作为退格键。

未来的fish版本将通过一个名为“ fish_key_reader”的小型帮助程序使此操作更容易一些。

您将$ TERM设置为什么? “ xterm”?

关键是退格键。
请给我发邮件,我将允许您进入我的邮箱,让您找出原因。

关键是退格键。

密钥上的标签没有告诉我们它发送什么字符序列。 您可以从git信息库提取的源安装fish吗? 如果可以,然后make fish_key_reader./fish_key_reader然后按退格键。 如果不能运行xxdod -tx1z按退格键,然后按[ctrl-D]。 同时运行bind -k backspace并向我们​​显示输出。 同时运行echo $TERM

出于责任原因以及由于我们不会读中文,我们都不想同时登录到您的系统,因此我们很难与set LANG zh_CN.UTF-8一起使用。

./fish_key_reader
999999 usec dec:8十六进制:8字符:\ b(aka \ cH)
仅供参考:绑定键名称“退格”的序列

绑定-k退格键
绑定:找不到键“退格键”的绑定

回声$ TERM
xterm

绑定:找不到键“退格键”的绑定

好的,那是你的问题。 它应该说像

bind -k backspace backward-delete-char

我看不到这与设置LANG变量有什么关系。 您已经以某种方式覆盖了默认的按键绑定。 我会在您的_〜/ .config / fish / _ **文件中搜索“ bind”一词的提及。 另外,您是否正在使用任何插件管理器(例如,fisherman或oh-my-fish),或者是否安装了可能与此问题相关的任何其他第三方脚本?

好。
〜/ .config / fish /只有3个文件:config.fish fish_history fishd.lhmtestdf.com

cat config.fish
set LANG zh_CN.UTF-8
cat fishd.lhmtestdf.com 
# This file is automatically generated by the fish.
# Do NOT edit it directly, your changes will be overwritten.
SET __fish_init_1_50_0:\x1d
SET __fish_init_2_3_0:\x1d
SET fish_color_autosuggestion:555\x1eyellow
SET fish_color_command:005fd7\x1epurple
SET fish_color_comment:red
SET fish_color_cwd:green
SET fish_color_cwd_root:red
SET fish_color_end:green
SET fish_color_error:red\x1e\x2d\x2dbold
SET fish_color_escape:cyan
SET fish_color_history_current:cyan
SET fish_color_host:normal
SET fish_color_match:cyan
SET fish_color_normal:normal
SET fish_color_operator:cyan
SET fish_color_param:00afff\x1ecyan
SET fish_color_quote:brown
SET fish_color_redirection:normal
SET fish_color_search_match:\x2d\x2dbackground\x3dpurple
SET fish_color_selection:\x2d\x2dbackground\x3dpurple
SET fish_color_user:green
SET fish_color_valid_path:\x2d\x2dunderline
SET fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x1b\x5b32mhelp\x1b\x5b30m\x1b\x28B\x1b\x5bm\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
SET fish_key_bindings:fish_default_key_bindings
SET fish_pager_color_completion:normal
SET fish_pager_color_description:555\x1eyellow
SET fish_pager_color_prefix:cyan
SET fish_pager_color_progress:cyan

在鱼2.2.0下
命令绑定输出:

bind
bind '' self-insert
bind \n execute
bind \ck kill-line
bind \cy yank
bind \t complete
bind \e\n commandline\ -i\ \\n
bind \e\[A up-or-search
bind \e\[B down-or-search
bind -k down down-or-search
bind -k up up-or-search
bind \e\[C forward-char
bind \e\[D backward-char
bind -k right forward-char
bind -k left backward-char
bind -k dc delete-char
bind -k backspace backward-delete-char
bind backward-delete-char
bind \e\[H beginning-of-line
bind \e\[F end-of-line
bind \e\[1\~ beginning-of-line
bind \e\[4\~ end-of-line
bind -k home beginning-of-line
bind -k end end-of-line
bind -k sdc backward-delete-char
bind \e\eOC nextd-or-forward-word
bind \e\eOD prevd-or-backward-word
bind \e\e\[C nextd-or-forward-word
bind \e\e\[D prevd-or-backward-word
bind \eO3C nextd-or-forward-word
bind \eO3D prevd-or-backward-word
bind \e\[3C nextd-or-forward-word
bind \e\[3D prevd-or-backward-word
bind \e\[1\;3C nextd-or-forward-word
bind \e\[1\;3D prevd-or-backward-word
bind \e\eOA history-token-search-backward
bind \e\eOB history-token-search-forward
bind \e\e\[A history-token-search-backward
bind \e\e\[B history-token-search-forward
bind \eO3A history-token-search-backward
bind \eO3B history-token-search-forward
bind \e\[3A history-token-search-backward
bind \e\[3B history-token-search-forward
bind \e\[1\;3A history-token-search-backward
bind \e\[1\;3B history-token-search-forward
bind \ca beginning-of-line
bind \ce end-of-line
bind \ey yank-pop
bind \cw backward-kill-path-component
bind \cp history-search-backward
bind \cn history-search-forward
bind \cf forward-char
bind \cb backward-char
bind \ct transpose-chars
bind \et transpose-words
bind \eu upcase-word
bind \ec capitalize-word
bind \ backward-kill-word
bind \eb backward-word
bind \ef forward-word
bind \e\[1\;5C forward-word
bind \e\[1\;5D backward-word
bind \e\[1\;9A history-token-search-backward
bind \e\[1\;9B history-token-search-forward
bind \e\[1\;9C forward-word
bind \e\[1\;9D backward-word
bind \e. history-token-search-backward
bind -k ppage beginning-of-history
bind -k npage end-of-history
bind \e\< beginning-of-buffer
bind \e\> end-of-buffer
bind \el __fish_list_current_token
bind \ew 'set tok (commandline -pt); if test $tok[1]; echo; whatis $tok[1]; commandline -f repaint; end'
bind \cl 'clear; commandline -f repaint'
bind \cc 'commandline ""'
bind \cu backward-kill-line
bind \ed kill-word
bind \cd delete-or-exit
bind -k f1 __fish_man_page
bind \eh __fish_man_page
bind \ep __fish_paginate
bind -k btab complete-and-search
bind \e cancel
bind \e\[I 'begin;end'
bind \e\[O 'begin;end'

但是在fish-2.3.0下,该命令绑定输出:

bind
bind '' self-insert
bind \n execute
bind \r execute
bind \t complete
bind \cc 'commandline ""'
bind \cd exit
bind \ce bind

您是如何安装fish 2.3.0的? 看起来您正在运行的fish二进制文件找不到用户空间脚本。

从来源

git clone
autoconf
configure
gmake
gmake install

好吧,这看起来很合理。 以下命令输出什么:

echo $__fish_active_key_bindings
echo $fish_function_path

函数路径目录之一(通常列出的最后一个)中是否有_fish_default_key_bindings.fish_? 我很好奇functions fish_default_key_bindings输出是什么。 不要复制粘贴该输出,但应与_fish_default_key_bindings.fish_文件中的输出匹配。 同样,通常由___ fish_config_interactive.fish_脚本设置按键绑定,该脚本应位于函数路径var列出的目录之一中。

当我删除.config / fish / config.fish时,一切运行良好。
但是当我将set LANG zh_CN.UTF-8字符串放入.config / fish / config.fish或/usr/local/etc/fish/config.fish时,问题就来了。

echo $__fish_active_key_bindings输出任何内容。

echo $fish_function_path输出:
/home/lhm/.config/fish/functions /usr/local/etc/fish/functions /usr/local/share/fish/vendor_functions.d /usr/local/share/fish/functions

当我删除.config / fish / config.fish或注释/usr/local/etc/fish/config.fish中的所有行时,输出为:

echo $__fish_active_key_bindings输出:
fish_default_key_bindings

echo $fish_function_path输出:
/home/lhm/.config/fish/functions /usr/local/etc/fish/functions /usr/local/share/fish/vendor_functions.d /usr/local/share/fish/functions

文件fish_default_key_bindings.fish在/usr/local/share/fish/functions/fish_default_key_bindings.fish中

鱼似乎从来没有设置键绑定。

这是因为__fish_config_interactive (包括绑定设置)从未运行(应该在您的第一个提示符之前出现),或者因为$ fish_key_bindings为空(如果值为,我们应该恢复为默认绑定)无效)。

由于它似乎是由设置$ LANG触发的,因此它指向编码问题。

您所有的配置文件和钓鱼文件在原始格式下可能都很好,因为我不确定github是否会帮助尝试修复编码。 另外,如果您未在config.fish中设置,则$ LANG值是多少? (它应该与ASCII兼容,因为否则我不认为我们甚至无法读取自己的文件,但您永远不会知道)

我在_config.fish_中添加了set LANG zh_CN.UTF-8 ,但没有遇到任何问题。 正如@faho所说,这似乎是字符编码问题。 具体来说,您的鱼文件未编码为UTF-8。 file /usr/local/share/fish/functions/__fish_config_interactive.fish报告什么? 如果显示“ ASCII文本”,则添加您的LANG行,然后启动一个新的shell,如下所示以收集调试输出:

script
fish -d5
exit
exit

然后将_typescript_文件附加到此问题。

file /usr/local/share/fish/functions/__fish_config_interactive.fish
/usr/local/share/fish/functions/__fish_config_interactive.fish: ASCII text

cat typescript output:
Script started on Mon May 23 07:34:02 2016
@ ~/home/lhm> /usr/local/bin/fish -d5
@ ~/home/lhm> exit

@ ~/home/lhm> exit

我勒个去? 您是在说fish -d5除了shell提示符外没有输出? 您应该获得了大量的输出,如下所示:

fish: Continue job 1, gid 0 (fish_title), COMPLETED, NON-INTERACTIVE
fish: proc::read_try('fish_title')
fish: io_buffer_t::read: blocking read on fd 3

DragonFly是对https://www.dragonflybsd.org/的引用set LANG Cset LANG en_US.UTF-8

是的, https://www.dragonflybsd.org/是项目主页。
我从git来源构建,例如:

git clone
autoconf
configure
gmake
gmake install

只有设置LANG C才能使fish -d5 。输出如下:

<2> fish: sourcing /usr/local/share/fish/config.fish
<4> fish: Exec job 'builtin source /usr/local/share/fish/config.fish' with id 1
<4> fish: Exec job 'set -g IFS \n\ \t' with id 2
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of set -g IFS \n\ \t to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 2, gid 0 (set -g IFS \n\ \t), COMPLETED, NON-INTERACTIVE
<4> fish: Exec job 'status --is-interactive' with id 2
<3> fish: Skipping fork: no output for internal builtin 'status'
<3> fish: Set status of status --is-interactive to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 2, gid 0 (status --is-interactive), COMPLETED, NON-INTERACTIVE
<4> fish: Exec job 'not set -q NVIM_LISTEN_ADDRESS' with id 2
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of not set -q NVIM_LISTEN_ADDRESS to 1 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 2, gid 0 (not set -q NVIM_LISTEN_ADDRESS), COMPLETED, NON-INTERACTIV

set LANG en_US.UTF-8set LANG zh_CN.UTF-8结果相同,除了shell提示符外没有产生任何输出。

在另一个DF 4.4盒子上

/usr/local/bin/fish -d5
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings

fish-2.2.0运行正常。

好吧,鱼和DragonFly宽字符函数之间显然不兼容,或者后者中存在错误。 您是否可以使用可在其上构建和测试鱼的DragonFly 4.3系统? 如果我们可以首先确认DragonFly 4.4语言环境支持引入的更改是关键更改,那就太好了。

我在4.2发行版DragonFly盒子上测试了最新的鱼,一切正常。

cat .config/fish/config.fish 
set -gx LANG zh_CN.UTF-8

locale
LANG="zh_CN.UTF-8"
LC_CTYPE="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_ALL=""


/usr/local/bin/fish -v
fish, version 2.3.0-162-g85e701f

uname -a
DragonFly . 4.2-RELEASE DragonFly v4.2.4-RELEASE #6: Sun Aug  9 13:25:14 EDT 2015     [email protected]:/usr/obj/home/justin/release/4_2/sys/X86_64_GENERIC  x86_64

好的,请与DragonFly的维护人员联系。 我并不是说错误在于他们的代码。 但是他们更有可能解释为什么在鱼调用它们时,诸如mbrtowc()wcrtomb()类的函数无法产生预期的结果。 这种行为只影响鱼类的可能性很小。

我也可以在DragonFly BSD 4.5-DEVELOPMENT上以任何UTF-8语言环境(例如en_AU.UTF-8 )重现此内容。

@ krader1961
因此,您能给我一个测试用例来测试mbrtowc()和wcrtomb()吗?

好的,请与DragonFly的维护人员联系。 我并不是说错误在于他们的代码。 但是他们更有可能解释为什么当Fish调用mbrtowc()和wcrtomb()之类的函数时未产生预期的结果。 这种行为只影响鱼类的可能性很小。

因此,您能给我一个测试用例来测试mbrtowc()和wcrtomb()吗?

我本来建议

$ gmake fish_tests
$ ./fish_tests convert

但这并没有失败。 通过./fish_tests运行所有测试会使多个测试失败,但是没有什么可以解释这个问题。

我安装了DragonFly 4.4.3,并从git head构建并安装了fish。 在我的_config.fish_中以set -x LANG en_US.UTF-8开始fish会产生很多意外错误,例如

alias: Name cannot be empty
There is no fish_key_bindings function called: 'fish_default_key_bindings'
Reverting to default bindings

毫不奇怪bind显示很少的键绑定,因为默认绑定很小。 locale命令报告了C直到我将其显式设置为en_US.UTF-8为止。 前者有效,而后者则无效。 系统默认语言环境是“ C”而不是“ en_US.UTF-8”,这一事实令人惊讶。 这是否表明DragonFly开发人员认识到他们的UTF-8支持存在问题?

我可能会或可能不会花更多的时间来调试它。 我鼓励您与DragonFly维护人员联系,因为他们很可能能够提供有关此问题的见解。

我有一个带有fwprintf最小测试用例,因此我将询问DragonFly BSD类型。

我很乐意测试任何补丁。

在DragonFly BSD邮件列表中,罗米克说

我在鱼壳中查看了解析器,您直接在输入流中使用特殊字符来标记不同的内容,例如BRACKET_BEGIN,BRACKET_END,BRACKET_SEP,INTERNAL_SEPARATOR等。

这很好,直到您遇到字符是字母的正式成员的语言环境为止。
可以看到,Unicode范围是0x0到0x10FFFF,字符INTERNAL_SEPARATOR的代码是0xFDD7。

在DragonFly BSD函数中,iswalnum()同时检查所有语言环境,因此
您有三个选择:
1)使用您自己的iswalnum():

diff --git a/src/common.h b/src/common.h
index e59dfc0..e8c01c3 100644
--- a/src/common.h
+++ b/src/common.h
@@ -769,4 +769,8 @@ __attribute__((noinline)) void debug_thread_error(void);
 /// specified base, return -1.
 long convert_digit(wchar_t d, int base);

+inline int iswalnum(wchar_t chr) {
+ return((chr >= L'a' && chr <= L'z') || (chr >= L'A' && chr <= L'Z') || iswdigit(chr));
+}
+
 #endif

2)为您的特殊字符使用更大的值(我尚未测试过)。

3)其他:)

我想知道那个人是否对Unicode有所了解。 这些“特殊字符”是专用区域字符,它们定义为非字母数字: httpsiswalnum(INTERNAL_SEPARATOR)返回false。 同样,我们也永远不会将那些特殊字符传递给fwprintf()之类的函数,因此我不明白为什么这与之相关。

真的很好,减少了测试案例@zanchey!

您如何安装DragonflyBSD? 我尝试使用夜间ISO和4.4.3版本的ISO(使用Virtualbox),但无法通过fwprintf缩减测试用例重现该问题。

编辑:我还能够在4.4.3上构建和安装fish,并且测试也通过了,除了通告程序测试。

测试案例仅通过SSH进行故障切换-它可以在VirtualBox的系统控制台上工作。

哇哦您正在使用Vagrant吗?

不,只是普通的VirtualBox 5.0.20。

我将在关闭#3406后作为副本获取所有权。 我将尝试寻找时间来安装FreeBSD并重现问题,如果成功,请进一步调试。

@lhmwzy,这可能是与#3406相同的问题。 仅供参考,我将后一问题一分为二,并进行了追踪,以提交f2246dfb343bea19beb176fb2cc534f85513b2eb。

从我的更新到问题#3406(请注意,我现在正在使用FreeBSD 12而不是DragonFly BSD):

仅供参考,我安装了FreeBSD 12,可以重现此问题。 这些键都不起作用的原因是未在UTF-8语言环境中设置默认键绑定:

Reverting to default bindings
The function call stack limit has been exceeded. Do you have an accidental infinite loop?
fish: __fish_reload_key_bindings VARIABLE SET fish_key_bindings
      ^
in event handler: handler for variable 'fish_key_bindings'

还有其他错误,例如alias: Name cannot be empty 。 我还确认从git checkout f2246df~构建不会出现此问题。 作为该更改的作者,这让我感到非常惊讶。

在行为发生分歧的地方找到提交,做得很好。 我不清楚这有什么问题。

还有其他错误,例如别名:名称不能为空

@ krader1961 :这似乎是@floam看到的相同问题:其中仅包含变量的引号解析为空参数-别名失败test -z "$name"时会发出错误。

@faho ,是的,我只是调试别名功能失败,并得出了相同的结论。 不管是否解决了所有这些BSD症状,这似乎都是更深入的好地方,因为双引号字符串涉及我们的内部标记之一VARIABLE_EXPAND_SINGLE,即unicode保留的char范围。

另外,我添加了调试语句,我们使用的所有isw...()函数(例如iswalnum() )在FreeBSD 12上为那些内部标记返回正确的结果。因此有人建议给@zanchey在BSD邮件列表上定义我们自己的iswalnum是没有用的。

实际上,您可以使用BSD上的UTF-8语言环境很容易地在双引号字符串问题内重现var扩展:

$ set wtf b
$ echo a "$wtf" c
a  c
$ echo "a $wtf c"
a b c
$ echo "a $wtf"
a
$ echo "$wtf c"
b c

当用双引号终止var引用时,绝对值得深入研究。 以上所有示例在LC_ALL = C下都可以正常工作。

几小时前我说iswalnum()在FreeBSD上返回了正确答案时,我错了。 在调用setlocale("")之前,我在调试输出中错误地调用了该函数。 移动这些调试打印结果表明,从0xFDD0开始的32个代码点块会导致iswalnum()iswgraph()在FreeBSD上返回一个值,而不是正确的值,即零,而不是GNU。 另一方面,GNU错误地为iswgraph()返回一个用于私人字符的字符,从0xF600开始,而FreeBSD正确返回零。

因此,似乎无论平台如何,我们都必须围绕这些功能实现自己的包装程序以获取正确的行为。 我需要考虑一下如何使用最少的附加代码和令人困惑的抽象层来做到这一点。

我已经打开了这个FreeBSD错误。 我们仍然需要解决这个坏的实现。

我们已经建立了鱼代码应该调用fish_wcswidth()而不是wcswidth() 。 我们已将其列为cppcheck规则(请参见_.cppcheck.rule_)。 我们可以对isw...()系列函数执行相同的操作。 但这是最好的解决方案吗? 当然,这是最容易实现的。 有谁有更好的解决方案?

PS,我倾向于将此问题归类为“增强”而不是“错误”,因为我们正在谈论增强鱼类以在我们支持的平台之一中解决错误。 是? 没有? 谁在乎? :微笑:

PPS,我已经验证了覆盖平台提供的iswalnum()解决FreeBSD 12上的这个问题。

解决此问题的首选方法是在配置时检查行为,并且仅当在此方面不兼容时才覆盖功能。

我不会基于autoconf测试覆盖平台功能。 首先,我们看到了发行版的实例,这些实例在一个发行版中具有正确(或不正确)的行为,然后在后续发行版中具有相反的行为。 例如,为FreeBSD 10构建的二进制文件仍然可以在FreeBSD 12上正常工作。基于autoconf测试的行为无法解决这一问题。 其次,即使我们将它们包装起来以确保正确的行为并且对受影响的函数的调用不在关键的性能循环中,所讨论的测试也非常便宜。 第三,我们需要此更改将引入的帮助器功能之一,以确保我们不允许用户将我们内部不可思议的仅代码点(在我的TODO列表中)注入我们的内部状态。

另外,为了记录,当我在较早的评论中写以下语句时,我颠倒了两个发行版:

另一方面,GNU错误地为iswgraph()返回一个用于私人字符的iswgraph(),从0xF600开始我们使用的字符,而FreeBSD正确返回零。

根据专用区域中的Unicode FAQ代码点,应归类为具有关联的字形(即iswgraph()应该返回一个),而不是字母数字(即iswalnum()应该返回)零)。

在我看来,一个autoconf测试可以检查iswalnum()在这些值之一上的结果是否有效。

来自端口的FreeBSD二进制软件包不会针对与目标库不同的libc构建-这构成了我们所有配置时测试工作方式的基础。

按照承诺,这将覆盖Linux和OS X上不必要的系统提供的功能@ krader1961。

Fish是在FreeBSD上针对共享libc构建并动态链接的:

$ ldd fish
fish:
        libncurses.so.8 => /lib/libncurses.so.8 (0x800948000)
        libthr.so.3 => /lib/libthr.so.3 (0x800b9c000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x800dc3000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801082000)
        libm.so.5 => /lib/libm.so.5 (0x8012a0000)
        libc.so.7 => /lib/libc.so.7 (0x8014cb000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801885000)

您是否100%肯定地说,如果语言环境子系统的行为发生变化,那么libc.so版本号将发生变化? 我既没有时间也没有探索这个问题的意愿。 考虑到我的修复方法不会明显影响鱼的行为或性能,我宁愿保守一点。

您是否100%肯定地说,如果语言环境子系统的行为发生变化,那么libc.so版本号将发生变化?

“不是我们的问题”。

“不是我们的问题”

当然是我们的问题。 这就是我们拥有fish_wcswidth()和类似的解决方案来解决实现问题的原因。

该错误在生成ctype文件的localedef工具中,它起源于Illumos。 在此处固定在DF上:

https://github.com/DragonFlyBSD/DragonFlyBSD/commit/07ed7d329a83714ec268e2f3ce026bba5a1ac5c2

@jrmarino :感谢您提供信息! 您知道什么时候可以将其用于各种操作系统吗? DF变更是否已经吸引到用户了?

非常感谢你的洗礼! 我刚刚升级到FreeBSD 11.0-RELEASE-p1,很好,这很烦人。 您知道补丁何时或何时将被集成到FreeBSD 11.0-RELEASE中吗?

请注意,我们通过git head构建的鱼解决了该错误。 如果您仍然对BSD上的git head的鱼有疑问,请告诉我们。 解决方法不在fish 2.3.1或任何早期版本中,但在即将发布的2.4.0版本中。

更改是完全独立的-对于任何维护人员,都应易于向后移植。

已经在代码审查中。
https://reviews.freebsd.org/D8148

大。

@shanavar我将在1个月后合并,因为更改相当麻烦,并且我想确保没有副作用,一旦验证通过,我将要求11.0-RELEASE的勘误表,这意味着您可以在大约一个月后看到它+

从git编译Fish在FreeBSD 11.0-RELEASE-p1上对我有用:

sudo pkg remove fish
sudo pkg install autoconf  gmake
git clone [email protected]:fish-shell/fish-shell.git
cd fish-shell
autoconf
./configure
gmake
sudo gmake install

然后将/usr/local/bin/fish/etc/shells并运行chsh -s fish将shell更改为Fish。

所以我不是唯一一个有这些问题的人。 谢谢大家的纠正,这让我发疯了。

此页面是否有帮助?
0 / 5 - 0 等级