** Description changed:

+ [Impact]
+ If a file has a space in its name and either -df, -tf, or -xf are used on the 
file while the user is using tab completion, it fails to add an escape 
character, so 'tar' treats it as two separate files. Because of this, 
tab-completion can't properly be used with the options -cf, -df, or -tf with 
tar.
+ 
+ -df: lists the differences between archives
+ -tf: lists contents of archive
+ -xf: extracts archive
+ 
+ [Test Case]
+ 1. Create the file 'test file': touch test\ file
+ 2. Press tab after typing this: tar -cf te
+    It should show a "\" as an escape character preceding the space, allowing 
tar to correctly interpret the name as one file, not two
+    Result: tar -cf test\ file
+ 
+ [Regression Potential]
+ 
  This works:
  
  $ touch test\ file
  $ tar -cf te<tab>
  $ tar -cf test\ file
  
  But this does not:
  
  $ touch test\ file
  $ tar -xf te<tab>
  $ tar -xf test file
  
  (No backslash.)
  
  Even:
  
  $ touch test\ file
  $ tar -xf test\ file<tab>
  $ tar -xf test file
  
  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: bash-completion 1:1.3-1ubuntu8
  ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
  Uname: Linux 3.2.0-26-generic x86_64
  ApportVersion: 2.0.1-0ubuntu10
  Architecture: amd64
  Date: Fri Jun 29 12:55:34 2012
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 
(20120319)
  PackageArchitecture: all
  ProcEnviron:
-  TERM=xterm
-  PATH=(custom, no user)
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  TERM=xterm
+  PATH=(custom, no user)
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: bash-completion
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1019217

Title:
  [SRU] Tab completion with tar -df, -tf, and -xf  don't support spaces
  in file name

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1019217/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to