Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-14768

bash-completion with a variable in path doesn't work for cd command

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • rhel-8.8.0
    • bash-completion
    • None
    • None
    • Moderate
    • rhel-plumbers
    • ssg_core_services
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • All
    • None

      ISSUE:
      bash completion with a variable in path doesn't work for cd command

      ENVIRONMENT:
      bash-4.4.20-4.el8_6.x86_64
      bash-completion-2.7-5.el8.noarch

      Existing behavior:

      [root@rhel-8-8 ~]# mkdir -p /tmp/$$/test
      [root@rhel-8-8 ~]# cd /tmp/$$/<tab>  
      >nothing happens:  cd /tmp/$$/

       

      Expected behavior:

      [root@rhel-8-8 ~]# mkdir -p /tmp/$$/test 
      [root@rhel-8-8 ~]# cd /tmp/$$/<tab>
      >should result:    cd /tmp/$$/test

       

      Additional information:
      once complete for `cd` is disabled ($ complete -r cd), the following bug (RHEL-14766) pops up:

      [root@rhel-8-8 ~]# complete -r cd
      [root@rhel-8-8 ~]# cd /tmp/$$/<tab> 
      [root@rhel-8-8 ~]# cd /tmp/\$\$/test/
      -bash: cd: /tmp/$$/test/: No such file or directory

       

              rhn-support-svashish Siteshwar Vashisht
              rhn-support-dbodnarc Dmitri Bodnarciuc
              Siteshwar Vashisht Siteshwar Vashisht
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: