summaryrefslogtreecommitdiff
path: root/src/GF/Command/Abstract.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Command/Abstract.hs')
-rw-r--r--src/GF/Command/Abstract.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/GF/Command/Abstract.hs b/src/GF/Command/Abstract.hs
index 29111b432..1ae5d6dff 100644
--- a/src/GF/Command/Abstract.hs
+++ b/src/GF/Command/Abstract.hs
@@ -65,3 +65,10 @@ prOpt o = case o of
mkOpt :: String -> Option
mkOpt = OOpt
+-- abbreviation convention from gf commands
+getCommandOp s = case break (=='_') s of
+ (a:_,_:b:_) -> [a,b] -- axx_byy --> ab
+ _ -> case s of
+ [a,b] -> s -- ab --> ab
+ a:_ -> [a] -- axx --> a
+