xevilads / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud autocomplete fails to escape spaces in file names #371

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Reproduction steps:
1. Start a shell and change directory to some empty directory
2. Create a file with a space in the name, e.g. with
touch "Test file"
3. In the same shell, type, without hitting return:
gcloud compute copy-files T
4. Hit the <tab> key to trigger shell autocompletion

Expected result:
Shell autocompletion yields:
gcloud compute copy-files Test\ file

Observed result:
Shell autocompletion yields
gcloud compute copy-files Test file

The space in the "Test file" filename is not escaped, so instead of being 
passed one argument with a value of "Test file", two arguments ("Test" and 
"file") are being passed, and don't match any actual filename.

Note that the default autocomplete behavior of my shell is different, e.g. if I 
type
cat T<tab>
then the shell correctly autocompletes this to
cat Test\ file

gcloud info:

Google Cloud SDK [0.9.84]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Sep 23 2015, 04:34:21)  [GCC 4.2.1 Compatible 
Apple LLVM 7.0.0 (clang-700.0.72)]]
Site Packages: [Disabled]

Installation Root: [/Users/REDACTED/google-cloud-sdk]
Installed Components:
  core: [2015.10.23]
  app-engine-python: [1.9.27]
  core-nix: [2015.09.03]
  kubectl: []
  app-engine-java: [1.9.27]
  gcloud: [2015.10.23]
  gsutil-nix: [4.14]
  app-engine-php: [ ]
  gsutil: [4.15]
  bq: [2.0.18]
  app-engine-php-darwin: [2015.08.17]
  bq-nix: [2.0.18]
  app: [2015.10.23]
  kubectl-darwin-x86_64: [1.0.6]
System PATH: 
[/Users/REDACTED/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sb
in]
Cloud SDK on PATH: [True]

Installation Properties: [/Users/REDACTED/google-cloud-sdk/properties]
User Config Directory: [/Users/REDACTED/.config/gcloud]
User Properties: [/Users/REDACTED/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [REDACTED]
Project: [REDACTED]

Current Properties:
  [core]
    project: [REDACTED]
    account: [REDACTED
    disable_usage_reporting: [True]
  [app]
    promote_by_default: [true]
    use_appengine_api: [True]
    suppress_change_warning: [true]

Logs Directory: [/Users/REDACTED/.config/gcloud/logs]
Last Log File: 
[/Users/REDACTED/.config/gcloud/logs/2015.11.04/21.06.17.303799.log]

Original issue reported on code.google.com by deben...@gmail.com on 5 Nov 2015 at 5:24

GoogleCodeExporter commented 8 years ago
Issue 372 has been merged into this issue.

Original comment by z...@google.com on 5 Nov 2015 at 11:23

GoogleCodeExporter commented 8 years ago
Thanks for reporting this. We're making some general changes to the way tab 
completion works, and we'll make sure this gets taken care of in with those.

Original comment by z...@google.com on 24 Nov 2015 at 7:22