Re: Multiline prompt problems with long commands
Hello, Thank you very much for the hint. It looks like all my problems with bash disappeared. Kamil 2014-11-04 20:01 GMT+00:00 Chris Down : > Kamil Neczaj writes: > >> Thank you for your response! I modified this prompt couple of times, >> probably that's why it's like this. Anyway, I don't think this should >> cause >> the problem. The PS1 variable is the one I use. I wanted to copy it here >> to >> have exactly the example which I know that causes problems for sure. >> > > Why don't you think this could cause the problem? You're missing the zero > width leader/terminator for that section, bash doesn't know how long your > prompt is (and thus when to wrap) without it. > > Did you actually *try* the suggested fix before you replied? >
set -o notify spurious CR when jobs redirected to file
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall uname output: Linux idallen-oak.home.idallen.ca 3.13.0-40-generic #68~precise1-Ubuntu SMP Tue Nov 4 16:00:24 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 4.2 Patch Level: 25 Release Status: release Description: Using "set -o notify" adds spurious CR to output of "jobs" when output is redirected to a file (but not into a pipe). Repeat-By: $ sleep 999 & [1] 16386 $ set +o notify $ jobs >out $ file out out: ASCII text $ set -o notify $ jobs >out $ file out out: ASCII text, with CRLF line terminators $ od -c out 000 [ 1 ] + R u n n i n g 020 s l 040 e e p 9 9 9 & \r \n 053 $ jobs | od -c 000 [ 1 ] + R u n n i n g 020 s l 040 e e p 9 9 9 & \n 052
Tab completion and ':'s
I'm working on adding tab completion to an application that deals with URLs, among other things. Since readline includes ':' as a delimiting character, it causes minor annoyances with tab-completing URLs. There's the known workaround of removing ':' from COMP_WORDBREAKS, but that requires every person that installs the application to apply the workaround, which is slightly less than ideal. I'm trying to see if there's a better solution that doesn't require any action from the user. One thought I had was what if readline/bash allowed control over the insertion point of the completion result? i.e. if there was a COMP_INSERT_POINT variable that could get/set the insertion point. Is that feasible?
bash-3.1, Shellshock issue, specially CVE-2014-7187.
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -$ uname output: Linux yutingkao23-desktop 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux Machine Type: i686-pc-linux-gnu Bash Version: 3.1 Patch Level: 23 Release Status: release Description: Where I test `(for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bas$ It shows bash: line 46: syntax error near unexpected token `;' bash: line 46: `for x46 in ; do :' CVE-2014-7187 vulnerable, word_lineno" Does bash-3.1 with patch 23 fix the CVE-2014-7187 already ? Repeat-By: Everytime