Skip to content
Snippets Groups Projects
Forked from KED Software Projects / Miscellaneous / KED U-Boot Fork
Source project has a limited visibility.
  • Kim Phillips's avatar
    af4d9074
    env: fix env var autocompletion · af4d9074
    Kim Phillips authored
    
    commit 560d424b "env: re-add
    support for auto-completion" fell short of its description -
    the 'used' logic in hmatch_r was reversed - 'used' is 0 if
    the hash table entry is not used, or -1 if deleted.  This
    patch makes hmatch_r actually match on valid ('used') entries,
    instead of skipping them and failing to match anything.
    
    typing 'printenv tft' and hitting 'tab' now displays valid
    choices for variable names.
    
    Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    Cc: Mike Frysinger <vapier@gentoo.org>
    Tested-by: default avatarMike Frysinger <vapier@gentoo.org>
    af4d9074
    History
    env: fix env var autocompletion
    Kim Phillips authored
    
    commit 560d424b "env: re-add
    support for auto-completion" fell short of its description -
    the 'used' logic in hmatch_r was reversed - 'used' is 0 if
    the hash table entry is not used, or -1 if deleted.  This
    patch makes hmatch_r actually match on valid ('used') entries,
    instead of skipping them and failing to match anything.
    
    typing 'printenv tft' and hitting 'tab' now displays valid
    choices for variable names.
    
    Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    Cc: Mike Frysinger <vapier@gentoo.org>
    Tested-by: default avatarMike Frysinger <vapier@gentoo.org>