about summary refs log tree commit diff
path: root/pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2019-09-08 14:00:56 +0200
committerProfpatsch <mail@profpatsch.de>2019-09-08 14:06:07 +0200
commite711ceac63b2f7384151ba2753fe085f738e8b39 (patch)
tree9e86bb989596f57fc14b456406694fbb6ec5c936 /pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall
Init: basic command line abstraction for fish’s complete
Diffstat (limited to 'pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall')
-rw-r--r--pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall b/pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall
new file mode 100644
index 00000000..2a9435d9
--- /dev/null
+++ b/pkgs/profpatsch/dhallsh/OptionPrinter/newStyle.dhall
@@ -0,0 +1,8 @@
+let Option = ../Option/type.dhall
+
+let newStyle
+	: Option → Text
+	=   λ(o : Option)
+	  → merge { Long = λ(t : Text) → "--${t}", Short = λ(t : Text) → "-${t}" } o
+
+in  newStyle