5.1-alpha: X primary selection being pasted in reverse video
hello I actually don't know if this is a real problem with 5.1-alpha or if it's something related to my environment and/or build procedure The problem is the following If I paste in a terminal running 5.1-alpha a string stored in the primary X selection, the string is inserted in reverse video (actually, not a big problem, since I'm not experiencing any other additional malfunction...) I'm not in the position to debug this. I can just add some empirical observations I have done about it: => no problem whatsoever if I run bash-5.0 (pl17) (everything else unchanged) => the problem doesn't seem to depend on the particular terminal program: xterm (my usual terminal), mlterm, vte (terminals I have at hand) => the problem goes away if I set the value of the TERM variable to something different from "xterm"; even unsetting TERM altogether fixes things => the problem goes away if I run screen in the terminal (this is probably related to the point above, as screen changes the TERM variable from "xterm" to "screen") => no problem if I'm not running X, eg if I make a selection and paste it with gpm in a console (again: TERM=linux in this case) On the whole, it looks to me that the problem might be related (in some way) to the interaction of 5.1-alpha with the terminal program when TERM=xterm Possibly related to this thread? https://lists.gnu.org/archive/html/bug-bash/2020-06/msg00066.html Apologies: as I said, my knowledge is insufficient to let me go deeper than this I enclose "stty -a" and bash build information below, if that can be of any help thanks a lot ciao -gabriele 8< Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -m64 Compilation CFLAGS: -I/usr/Xorg/include uname output: Linux dschgrazlin2 5.7.3 #1 SMP Thu Jun 18 09:18:36 CEST 2020 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 Patch Level: 0 Release Status: alpha >8 8< dschgrazlin2:17> stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt -echoctl echoke -flusho -extproc >8
Re: 5.1-alpha: X primary selection being pasted in reverse video
> It's not a bug. This is the `active region' code displaying the text > inserted by a bracketed paste. You can see some of the most recent > discussion here: > > https://lists.gnu.org/archive/html/bug-bash/2020-03/msg00064.html > > The original patch was from 2018: > > https://lists.gnu.org/archive/html/bug-bash/2018-03/msg00056.html > > This has a basic description of the functionality and rationale. I just want to thank you for taking the time to reply: I could have read the docs! Apologies for the noise ciao -gabriele
Re: Problem with small script
> On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote: > > The script: > > #/bin/bash ^ missing ! here typo in the shebang? > > # testlink.sh > > # must be run as root > > > > file1="$1" > > shift > > mandir=/usr/local/share/man/man3/ > > cp "$file1" "$mandir" > > cd "$mandir" > > You MUST check the result of cd. If it fails but you continue on, > you will be operating in the wrong place. > > > echo '$hash = '"$#" > > while (( "$#" )); do > > file2="$1" > > ln "$file1" "$file2" > > shift > > done > > > > Results: > > >> sudo ./testlink.sh readfile.3 readtextfile.3 > > $hash = 1 > > ./testlink.sh: 11: ./testlink.sh: 1: not found > > >> > > As near as I can tell, you are somehow running this script under sh > instead of bash. ciao gabriele
5.3-alpha: less readable output when set -x
hello Apologies if I am missing some blatant point here I have noticed a difference in behavior of bash-5.2.26 and bash-5.3-alpha which isn't a problem of correctness, but may be wasn't intentional(?) Given the scriptlett: 8< #!/bin/sh set -x show () { cat < ./scriptlett.sh ##> ./scriptlett.sh + show ' + show $'\n1\n2\n3\n' 1+ cat 2 31 '2 + cat3 1+ return 0 2+ exit 0 3>8 + return 0 + exit 0 >8 Note the difference in how the argument to the function is output. In the case of bash-5.3-alpha the syntax of the argument is correct (ie if I call the show function with $'\n1\n2\n3\n' everything works as expected), but is less readable (and this is more so if the argument is a long stretch of lines) For what I seem to understand, this might be related to: 8< b. Bash does a better job of preserving user-supplied quotes around a word completion, instead of requoting it. >8 ? Of course, if the "new" behavior is intentional, I guess there will be good reasons for it and apologize for the noise Just noticed and thought it was good to report upstream thanks a lot for your valuable work ciao -gabriele
Re: 5.3-alpha: less readable output when set -x
> This is from https://lists.gnu.org/archive/html/bug-bash/2023-06/msg00092.htm > l > > It ensures e.g. that control characters are always displayed in a > printable manner. so that is definitely intentional and everything is now clear to me thanks a lot for your time ciao -gabriele
readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
hi just tried to build/install readline-8.0-alpha and found the following glitch: 8< /bin/install: cannot create regular file '/opt/stow.d/versions/readline-8.0-alpha/usr/lib64/pkgconfig/readline.pc': No such file or directory make[1]: *** [Makefile:245: install-pc] Error 1 make[1]: Leaving directory '/home/balducci/tmp/install-us-d/readline-7.0.d/readline-8.0-alpha' >8 The reason seems to be the installdirs target in Makefile.in missing to create $(DESTDIR)$(pkgconfigdir). This fixes things for me: diff -c ./Makefile.in.CREATE_PKGCONFIGDIR ./Makefile.in *** ./Makefile.in.CREATE_PKGCONFIGDIR Thu May 24 17:23:06 2018 --- ./Makefile.in Thu May 24 17:23:06 2018 *** *** 260,266 installdirs: $(srcdir)/support/mkinstalldirs -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ ! $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc --- 260,266 installdirs: $(srcdir)/support/mkinstalldirs -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ ! $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) \ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc ciao gabriele
Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir
> >> Thanks for the report. I think a better fix is to not to attempt to > >> install readline.pc if $(pkgconfigdir) is missing. > > > > Why not? If you are doing an install into DESTDIR for the purpose of > > bundling a pre-built binary for a distro, then $(pkgconfigdir) will be > > missing, because the ONLY things living in DESTDIR are what the package > > itself installs. When DESTDIR is empty, you're right that either > > $(pkgconfigdir) is likely to already exist, or that the user is not using > > pkg-config; but even that's a risky assumption (when bootstrapping a > > system, readline might be installed prior to pkg-config, and we shouldn't > > require the user to run 'make install' a second time just to install the > > pieces that weren't installed the first time). > > Good point about $(DESTDIR). I don't quite buy the bootstrapping argument. Actually, I don't use DESTDIR, but my situation is equivalent: I use stow (https://www.gnu.org/software/stow/). Which means: I install every version of every package under a brand new directory tree (eg --prefix=/opt/stow.d/versions/readline-8.0-alpha/) and stow creates links from the package specific installation tree to "legacy" system directories (/usr/bin /usr/lib /usr/lib/pkgconfig etc.): so, also in my case the pkgconfig dir doesn't exist at install time, but I definitely want to create it and to install readline.pc -g