# sort alias for Powershell

## Intro

• Powershell introduced by Microsoft in 2006 for Windows OS.
• Since earlier versions, Powershell provides predefined aliases for commands. For example, alias sort for command sort-object.
• Microsoft has released Powershell for Linux in 2018 (Powershell 6.1+).
• Powershell 6.1+ for Linux contains predefined aliases, but the sort alias is not included in the standard package. Powershell 6.1+ for Windows still contains sort among the other aliases.

## Questions

1. Do you think it is possible to use sort in Powershell answers?
2. is it need additional comments in answers to use sort?
3. How have similar cases been solved for other languages?

Thanks

• This is how Powershell 6.2.1 behaves in Ubuntu 18.04.2 LTS for clarity, not only for sort, but also for the ls and man aliases. – Andrei Odegov Jun 28 '19 at 19:28
• See this issue and this pull. Dennis, I think, made the profile modification from issue 567 so that TIO works for sort and the like. – AdmBorkBork Jul 8 '19 at 14:15
• – Veskah Jul 12 '19 at 16:44

# Yes

This sounds perfectly fine to me. There are a couple similar questions. For example...

And there are plenty of answers that work in Linux but not Windows, or vice-versa. In PPCG, a language is defined by its implementation, so as long as it works on one implementation (in this case, Windows Powershell 6.1), then it's a valid submission.

It would probably be best for you to mention if an answer is Windows specific. Either like this:

# Powershell, 1 bajillion bytes

<some code>


Doesn't work on Linux because it uses the sort alias.

Or

# Windows Powershell 6.1, 1 bajillion bytes:

<some code>


The same idea applies if you wanted to use the Linux specific aliases.

# Yes

On PPCG, we define languages by their implementation/interpreter. So, as long as the sort alias exists in any one version of Powershell and an interpreter exists for that version, it's fair game.

The only requirement then is, when posting solutions that use sort, to include the version name/number with the language name.