read builtin ignores a byte after \r in bash-4.3-p42 in Cygwin
Configuration Information: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3 -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3/include -I/usr/src/bash-4.3.42-4.i686/src/bash-4.3/lib -DWORDEXP_OPTION -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/bash-4.3.42-4.i686/build=/usr/src/debug/bash-4.3.42-4 -fdebug-prefix-map=/usr/src/bash-4.3.42-4.i686/src/bash-4.3=/usr/src/debug/bash-4.3.42-4 uname output: CYGWIN_NT-6.1 microsoft-win7 2.4.1(0.293/5/3) 2016-01-24 11:24 i686 Cygwin Machine Type: i686-pc-cygwin Bash Version: 4.3 Patch Level: 42 Release Status: release Description: In bash-4.3-p42 from Cygwin read builtin ignores some bytes after CR-byte. Repeat-By: $ printf '...\r\xff...' | { read -r; printf %s "$REPLY"; } | cat -A ...^M... $ env -i /bin/bash -c 'printf "...\r\xff..." | { read -r; printf %s "$REPLY"; } | cat -A' ...^M... In GNU/Linux and bash-4.3-p42 these commands output: ...^MM-^?...
Re: Looking for tutorials
On Fri, Mar 18, 2016 at 03:58:22PM -0500, John McKown wrote: > ???I had never heard anything about this. And I thought you were "funnin" > him. >From the 4.4-beta CHANGES file: 3. New Features in Bash a. `make install' now installs the example loadable builtins and a set of bash headers to use when developing new loadable builtins. b. `enable -f' now attempts to call functions named BUILTIN_builtin_load when loading BUILTIN, and BUILTIN_builtin_unload when deleting it. This allows loadable builtins to run initialization and cleanup code. c. There is a new BASH_LOADABLES_PATH variable containing a list of directories where the `enable -f' command looks for shared objects containing loadable builtins. > But this page looks like it _might_ be an interesting start: > https://gist.github.com/sshaw/8017032 Ah, yes. That looks like the beginning of an API document. Cool.
Re: read builtin ignores a byte after \r in bash-4.3-p42 in Cygwin
On 3/20/16 12:54 AM, Жанна Целых wrote: > uname output: CYGWIN_NT-6.1 microsoft-win7 2.4.1(0.293/5/3) 2016-01-24 > 11:24 i686 Cygwin > Machine Type: i686-pc-cygwin > > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > In bash-4.3-p42 from Cygwin read builtin ignores some bytes after > CR-byte. It may be the setmode() call in the read builtin, but that's been there forever. I don't use cygwin or test on it. You'll probably have better luck filing a bug report with the cygwin folks. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/
Re: read builtin ignores a byte after \r in bash-4.3-p42 in Cygwin
21.03.2016 3:49, Chet Ramey пишет: It may be the setmode() call in the read builtin, but that's been there forever. I don't use cygwin or test on it. You'll probably have better luck filing a bug report with the cygwin folks. Done it. Thank you for considering the previous email. Will try to solve the problem with Cygwin team.