Explorar o código

Make ledgerutil a bit more helpful

Samuel W. Flint %!s(int64=7) %!d(string=hai) anos
pai
achega
f93884cad3
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      ledgerutil

+ 8 - 0
ledgerutil

@@ -22,6 +22,10 @@ function list-utilities () {
 }
 
 function new-utility () {
+    if [[ $# -lt 2 ]] ; then
+        echo "ledgerutil new name ( perl / shell / python )"
+        exit 1
+    fi
     name=$1
     shift
     type=$1
@@ -59,6 +63,10 @@ EOF
 }
 
 function edit-utility () {
+    if [[ $# -lt 1 ]] ; then
+        echo "ledgerutil edit name"
+        exit 1
+    fi
     name=$1
     shift
     if [[ -e ~/.ledger/utilities/${name}.sh ]] ; then