← Back to team overview

desktop-packages team mailing list archive

[Bug 1426107] Re: Shell lockup with on tab completion of tar with --acls option

 

Digging into /usr/share/bash-completion/completions/tar I found some
answers. Basically the completer doesn't understand the intent argument
"-c" when the intent is not the first argument. That confused the
program and it's trying to extract the index of a (nonexistant) tar file
by running:

tar t foo.tar

Lacking the "f" argument TAR is reading from STDIN and that will hang us
up forever. I tried CTRL-D but that didn't work.

Attached is a patch that works around the problem by blinding the
completer when the first argument is --something. A better solution
would be to fix the parser to understand arguments in any position but
in the mean time it's better for my mental health not to crash.


** Patch added: "Workaround patch"
   https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1426107/+attachment/4328767/+files/tar-completer.patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-331 in Ubuntu.
https://bugs.launchpad.net/bugs/1426107

Title:
  Shell lockup with on tab completion of tar with --acls option

Status in nvidia-graphics-drivers-331 package in Ubuntu:
  New

Bug description:
  Bash completion causes the shell to lockup when completing command
  lines for the TAR command. The following sequence of commands shows
  the problem:

  # starting in an empty directory
  mkdir foo
  touch foo/bar
  touch foo/bak
  tar -cvf foo.tar <tab>
  tar --acls -cvf foo.tar <tab>

  After the last tab the shell is locked up permanently and is no longer
  usable. This only seems to happen when the --acls option is specified,
  though it may affect others too (I have only tried --acls).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1426107/+subscriptions


References