Bash does not complete the filename once the situation becomes singular

2025-05-12 Thread Adam Purkrt

GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
OS: Gentoo Linux


Originally met this while the download of iso file in firefox was
nearing completion, and I was preparing myself to move the
downloaded foobar.iso file elsewhere. I opened terminal with bash,
typed "mv foobar." in the Downloads dir and pressed . Two options
appeared: foobar.iso and and foobar.[somecode].iso.part. I kept pressing
, but after the download finished, with repeated presses bash kept 
displaying "foobar.iso" as a single option of completion and did not

complete to the already singular name.


Steps to reproduce:

1) in one instance of bash, run
touch foobar.a; touch foobar.b; sleep 10; rm foobar.b
2) run second instance concurrently, type "ls foobar.",
press  twice to get the two options existing at that moment
("foobar.a" and "foobar.b")
3) keep pressing  repeatedly
4) as the 10 seconds pass and the situation becomes clear and
complete-able, "foobar.a" is never completed to with repeated
presses of , it is (strangely) only displayed as a single
option for completion.

The result on screen around the 10th second looks as follows:

# ls foobar.
foobar.a  foobar.b
# ls foobar.
foobar.a  foobar.b
# ls foobar.
foobar.a
# ls foobar.
foobar.a
# ls foobar.
foobar.a


Expected behaviour:

Bash should complete to "foobar.a" as soon as it is an unique option,
i.e. as soon as foobar.b is removed after 10 seconds. Offering a
singular option for completion does not make sense anyway.


Additional note:

Also, when, in the erroneous situation after the 10 seconds elapsed, the
"." at the end of filename is deleted and written again (visually the 
same situation) and then  is pressed, the completion succeeds.




Cross-Compile - Makefile - Install-strip

2025-05-12 Thread NR
"STRIP" is currently hard-set to "strip", which fails for
cross-compiled binaries.
```
install-strip:
$(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s
--strip-program=${MINE_CROSS_COMPILE}strip' \
prefix=${prefix} exec_prefix=${exec_prefix} \
DESTDIR=$(DESTDIR) install
```

Examples of implementations that allow a custom "strip" program to be
used can be found in coreutils and make:
```
install-strip:
if test -z '$(STRIP)'; then \
  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)"
INSTALL_STRIP_FLAG=-s \
  install;
```
During a build setting 'INSTALL_STRIP_PROGRAM="install -s
--strip-program=-strip"', allows the install with strip to
succeed.

It'd be nice if this implementation could be standardized under the
GNU umbrella.