Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ls parameters error in Windows 10 #597

Closed
luisangelsm opened this issue Aug 17, 2015 · 5 comments
Closed

ls parameters error in Windows 10 #597

luisangelsm opened this issue Aug 17, 2015 · 5 comments

Comments

@luisangelsm
Copy link

I have installed 1.2 version in Windows 10. Now I am getting this error when I use parameters in ls

Get-ChildItem : A parameter cannot be found that matches parameter name 'al'.
At line:1 char:4
+ ls -al
+    ~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Any ideas about what is going on?

@luisangelsm
Copy link
Author

It seems that the path is not set properly and it is using the ls command from PowerShell. I have changed the startup to {cmd} by now, but loosing (obviously) all the new PS prompt :(

@Jackbennett
Copy link
Contributor

PS adds some aliases to its way of doing things so that nix and cmd people aren't punished outright for trying PS.

As such dir and ls are just aliased to get-childItem which if I read from bash correctly; -a, List all entries including those starting with a dot . and -l, Use a long listing format powershell just does that all the time anyway.

You might find common nix commands aliased to powershell but using parameters is where that helpfulness breaks down.

see: get-alias, even more info with help alias.

Either get used to some powershell, stick to cmd, or in your PS profile if you really want you can remove defined aliases like they're files mapped to the alias drive. rm alias:\ls. I think that will keep looking down your path for ls.

Just do rm alias:\rm last ;)

@Nabeel-Niaz
Copy link

Get-ChildItem : Parameter cannot be processed because the parameter name 'a' is ambiguous. Possible matches include: -Attributes
-Directory -File -Hidden -ReadOnly -System.
At line:1 char:4

  • ls -a
  • ~~
    + CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.GetChildItemCommand

@Nabeel-Niaz
Copy link

Get-ChildItem : Parameter cannot be processed because the parameter name 'a' is ambiguous. Possible matches include: -Attributes
-Directory -File -Hidden -ReadOnly -System.
At line:1 char:4

  • ls -a
  • ~~
    + CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.GetChildItemCommand

I have this error what is the solution for this error.

@chrisant996
Copy link
Contributor

@Nabeel-Niaz The question is already answered here, and in the linked issue.

This is how PowerShell works. If you don't want the cmdlets PowerShell defines by default, then you can either undefine them or use a different shell than PowerShell. PowerShell is not Linux, nor bash, nor etc.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants