mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 15:51:15 -03:00
Fix function output on FreeBSD/Cygwin systems
This commit is contained in:
committed by
Fabian Homborg
parent
4e931fd967
commit
103a26ffb1
@@ -1,3 +1,8 @@
|
|||||||
function __fish_print_encodings -d "Complete using available character encodings"
|
function __fish_print_encodings -d "Complete using available character encodings"
|
||||||
iconv --list | sed -e 's|//||'
|
if iconv --usage &>/dev/null # only GNU has this flag
|
||||||
|
# Note: GNU iconv changes its output to contain the forward slashes below when stdout is not a tty.
|
||||||
|
iconv --list | string replace -ra '//' ''
|
||||||
|
else # non-GNU
|
||||||
|
iconv --list | string replace -ra '\s+' '\n'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user