From 5e7712cdd34e5f684fa826fbe20745716feae1b2 Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Thu, 21 Feb 2013 00:00:29 +0400
Subject: [PATCH] estrlist: add uniq alias

---
 bin/estrlist | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bin/estrlist b/bin/estrlist
index 31b656d..d0df313 100755
--- a/bin/estrlist
+++ b/bin/estrlist
@@ -56,6 +56,10 @@ union()
          list $@ | sort -u
 }
 
+uniq()
+{
+        union $@
+}
 
 # remove_from_list "1." "11 12 21 22" -> "21 22"
 reg_remove()
@@ -116,6 +120,7 @@ help()
         echo "exclude <list1> [list2]           - print list2 words contains also in list1"
         echo "reg_exclude <PATTERN> [word list] - print only words not matched with PATTERN"
         echo "union [word list]                 - sort and remove duplicates"
+        echo "uniq  [word list]                 - alias for union"
         echo "list [word list]                  - just list word by line"
         echo "count [word list]                 - print word count"
         echo
@@ -143,9 +148,11 @@ if [ "$COMMAND" = "-h" ] || [ "$COMMAND" = "--help" ] ; then
 fi
 
 shift
+
+# FIXME: do to call function directly, use case instead?
 if [ "$1" = "-" ] ; then
     shift
-    "$COMMAND" "$(cat)"
+    "$COMMAND" "$(cat) $@"
 else
     "$COMMAND" "$@"
 fi
-- 
2.24.1