bash is missing feature to use keyword if identically named alias exists

Bug #1877571 reported by Mikko Rantalainen
10
This bug affects 2 people
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
ProcVersionSignature: Ubuntu 5.3.0-51.44~18.04.2-lowlatency 5.3.18
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)

Revision history for this message
Mikko Rantalainen (mira) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.