small refactor for simplification
[cedit] / cedit
diff --git a/cedit b/cedit
index d04f587b62928d5ab9744bdccac5e890eb07b895..0a6b4c938a74e9d79fa212d9bc21e852b1f46c0a 100755 (executable)
--- a/cedit
+++ b/cedit
 
 cedit() {
     local help="Usage: [-h|--help ] [-v] [SECTION_NAME] FILE
-Create/edit a #comment delimited section of a file
+Create/modify a section in a config file
 
-Reads STDIN for the contents of the section. Without SECTION_NAME, it
-acts on a global unnamed section. cedit is short for config edit.
+The section is #comment delimited. Reads STDIN for the contents of the
+section. Without SECTION_NAME, it acts on a global unnamed
+section. cedit is short for config edit.
 
 -v         Verbose
 -h|--help  Help"
@@ -28,13 +29,10 @@ acts on a global unnamed section. cedit is short for config edit.
     local verbose=false
 
     case $1 in
+        -v) verbose=true; shift ;;
         -h|--help) echo "$help"; return ;;
     esac
 
-    if [[ $1 == -v ]]; then
-        verbose=true
-        shift
-    fi
     if (( $# == 2 )); then
         name=": $1"
         shift