Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565868 - app-shells/bash: 'compgen -v' includes variables that are global-set but local-unset
Summary: app-shells/bash: 'compgen -v' includes variables that are global-set but loca...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-15 23:07 UTC by Michał Górny
Modified: 2016-06-23 05:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-15 23:07:35 UTC
A simple test case:

  TEST=value

  foo() {
    local TEST
    unset TEST # even this doesn't help
    compgen -v | grep TEST
    declare -p TEST
  }
  foo

As you can see, 'compgen -v' lists the variable even though it's unset and unusable in local scope.