Appearance
Sort
Sort the selected lines alphabetically.
Demo

Readme
Sort
Sorts lines using a natural, case-insensitive sort. Empty lines are removed from the output.
Condition to appear: Input contains more than one line.
Requirements
Requires PopClip 2021.11 (3785).
Notes
The original PHP version used the natcasesort
function, which is a case-insensitive natural ordering. (A natural ordering treats numbers as numeric values rather than character values, and so is more "human-like".)
In porting to JavaScript I have used localeCompare
with options {numeric: true, sensitivity: 'base'}
.
Authors
Agassi, Nick Moore
Changelog
v3 - 1 Nov 2021
- Re-implemented in JavaScript.
v2 - 17 Dec 2015
- Modified to no longer remove duplicates.
v1 - 8 Feb 2013
- Original extension (PHP) by Agassi.
Info
- First published
Feb 8, 2013 - Identifier
com.pilotmoon.popclip.extension.sort
- Source
pilotmoon/PopClip-Extensions/source/Sort.popclipext