about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--users.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/users.go b/users.go
index a40c177..1f8cfb3 100644
--- a/users.go
+++ b/users.go
@@ -15,6 +15,20 @@ func usersQuery(format string) ([]byte, error) {
 	}
 
 	users := strings.Fields(string(ls))
+
+	if format == "plain" {
+		var out []string
+		for _, e := range users {
+			if strings.HasPrefix(e, ".") || strings.HasPrefix(e, "_") {
+				continue
+			}
+			out = append(out, e)
+		}
+		outstring := strings.Join(out, "\n")
+		outstring += "\n"
+		return []byte(outstring), nil
+	}
+
 	out := `{
 	"users": [
 `