Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Keith Thompson Newsgroups: gnu.bash.bug Subject: "jobs" doesn't consistently expand function arguments Date: Mon, 23 Jul 2018 16:54:34 -0700 Lines: 48 Sender: keithsthompson@gmail.com Approved: bug-bash@gnu.org Message-ID: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1532390080 21515 208.118.235.17 (23 Jul 2018 23:54:40 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Keith Thompson To: bug-bash@gnu.org, bash@packages.debian.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=cZ/AQYkrrhbje28BhlGgDE8ty63qkb9lzi7auS1v6gI=; b=AxOHwOaP86V+7e+KrezXTa6+vPjK1jrveYttKA2nXtebf/w95iBiF1MUsrM8DL7L4H dlGww5FN6lWkxPoSa6l33ZHpXpeepJZiB4XNg9+npleSxe3l7RN/2ev6g5kMqzBb+XCy d0xjcqznbGvB/7x/88dXlxqggXPxOkTElGE8W4VjzHw2uBmT1VAOwtmapDUNAeqE3U2r XKn6ph3J2HhPs/UMte6Nnvzmm7qoGU+zPB2weKgRxLRX8iK8HQseXtbz+v3wnr4oFRYO xABdAQfj7cYLE6vzSkATdn3TgpAAwskNbtu86zjR4DKgyfQKnU5zTFlkiV6JRpOUWQPg LVig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc; bh=cZ/AQYkrrhbje28BhlGgDE8ty63qkb9lzi7auS1v6gI=; b=PFUjcLiYEBgW1yEYt4ZEwUdZ2yfK1E/BySqpLpwrTamTJpxdhGbhGEZjdSWgodvYGf X5KErq0xkewXqrpQtsFVwJpLzpXNVFQjXEZoSrJgDtqc2HIJ4fEoS09Vc9psYONePDlL vuFfJ3WKWBKh96Kw3KRvXptS0LtggwihPYzUgskKisLRxkoszk1ucdJTT1pxt8wixYLM McG6YNrHTRVq/qDg0E4ggg0+k9qmuLw/mEsvBaL7BL+XuePXLfsxAykI6H1sobh+JYhN vpeLbCbOt1s/WXgazcbtW0xp1zDZWtR6HpHsi+23ieLlO9BjnU5Iw9Fo6BOFI+J+998+ R8kg== X-Gm-Message-State: AOUpUlHPjOYYccyu/Hp0Z1mZsB1/HK0QyQHy8QdpbgQpL2ahsgnefKma sqKfcdSmd+caWfCAPG73cji3DAimp0ZZNc5VjxAd2PFa X-Google-Smtp-Source: AAOMgpeuEUCvBTXdgd2GVBze4WDL9boNeq0OTG4l5i/RBFYwTZ/xwP9Lh5z0PUHOBzF0d6nxSKg9Uh2d+eSsVDIXajc= X-Received: by 2002:a50:ba3b:: with SMTP id g56-v6mr16246993edc.85.1532390074771; Mon, 23 Jul 2018 16:54:34 -0700 (PDT) X-Google-Sender-Auth: nz5jrTrVZjS0RF2ZL2_LXXuCrHY X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::532 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14389 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../. -I.././include -I.././lib -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/bash-vEMnMR/bash-4.4.18=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux bomb20 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 4.4 Patch Level: 19 Release Status: release Description: The "jobs" command doesn't consistently expand function arguments Repeat-By: For example: /bin/bash --login --noprofile bash-4.4$ nap() { sleep "$@" ; } bash-4.4$ nap 1234 ^Z [1]+ Stopped sleep "$@" bash-4.4$ bg [1]+ sleep "$@" & bash-4.4$ nap 2345 & [2] 9666 bash-4.4$ jobs [1]- Running sleep "$@" & [2]+ Running nap 2345 & bash-4.4$ The problem is the '"$@"' in the "jobs" output, which doesn't provide any useful information. This is on Ubuntu 18.04 LTS. I've see the same problem with bash 5.0-alpha (built from source). I'd prefer to see "sleep 1234" in the output of "jobs", though "nap 1234" would also be ok.