bash is missing feature to use keyword if identically named alias exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
If following command is run
(sleep 1 & sleep 1 & time wait); date
bash is supposed to run two commands in parallel, wait for both to complete and the run third command.
However, if current environment has following alias configured
alias time='/usr/bin/time -v'
then the above command will fail with
/usr/bin/time: cannot run wait: No such file or directory
and the final command is run without a wait.
Bash already has "command" to force interpretation as system command and "builtin" to force interpretation as built-in command. However bash is missing "keyword" to force interpretation as keyword.
One should be able to write
(sleep 1 & sleep 1 & keyword time wait); date
to force time to be interpreted as bash keyword.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: bash 4.4.18-2ubuntu1.2
ProcVersionSign
Uname: Linux 5.3.0-51-lowlatency x86_64
ApportVersion: 2.20.9-0ubuntu7.14
Architecture: amd64
CurrentDesktop: MATE
Date: Fri May 8 15:48:23 2020
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-01-05 (488 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: bash
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.