Skip to content

Need mechanism to disable globbing #5167

Closed

Description

Globbing support on Linux has caused us to have to revert to using bash scripts because we can't pass parameters that contain * through to the executable. In this case, we are trying to invoke a C++ pkg manager called conan. It would be nice to have an option like set -o noglob in bash to disable globbing.

Steps to reproduce

Try to execute conan (or echoargs) with:

conan info --only "None" --package_filter 'PkgName/*' --cwd ../..

Note: I've tried quoting the arg and escaping the *. Neither works with conan.

Expected behavior

The PkgName/* gets passed through to conan,

Actual behavior

This generates an error:

Cannot find path '/home/hillr/code/dotnet/echoargs/bin/Debug/netcoreapp2.0/PkgName' because it does not exist.
At line:1 char:1
+ dotnet ./echoargs.dll info --only "None" --package_filter PkgName/* - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (/home/hillr/cod...eapp2.0/PkgName:String) [], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta.8
PSEdition                      Core
GitCommitId                    v6.0.0-beta.8
OS                             Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Related issues: #3931 #4971 #4683 and PR #4489

Activity

  1. added
    WG-Language
    Issue-Discussion
    on Oct 19, 2017
  2. SteveL-MSFT commented on Oct 20, 2017

    @SteveL-MSFT
    Member

    --% should work on a per command basis today, right? This is for a session based preference?

  3. rkeithhill commented on Oct 20, 2017

    @rkeithhill
    CollaboratorAuthor

    Indeed that does work - per command. That's a workaround for now.

  4. mklement0 commented on Oct 2, 2019

    @mklement0
    Contributor

    This can probably be closed now:

    Using single- or double-quoting now suppresses globbing - #5188 was merged a long time ago.

  5. SteveL-MSFT commented on Oct 2, 2019

    @SteveL-MSFT
    Member

    Keith Hill (@rkeithhill) let me know if #5188 doesn't resolve your issue

  6. rkeithhill commented on Oct 2, 2019

    @rkeithhill
    CollaboratorAuthor

    It does and that is what I've been using for a while now on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-DiscussionResolution-FixedWG-Language

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions