Browse Source

Add and use warn() routine

Alois Mahdal 6 years ago
parent
commit
6a8253a33c
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      dotfiles/gittum/bin/remote-edit

+ 6
- 2
dotfiles/gittum/bin/remote-edit View File

4
 # Edit URL of remote $1 using vipe(1)
4
 # Edit URL of remote $1 using vipe(1)
5
 #
5
 #
6
 
6
 
7
+warn() {
8
+    echo "$@" >&2
9
+}
10
+
7
 die() {
11
 die() {
8
-    echo "$@" 1>&2
12
+    warn "$@"
9
     exit 1
13
     exit 1
10
 }
14
 }
11
 
15
 
12
 usage() {
16
 usage() {
13
-    echo "usage: git $(basename "$0") [-v|--verbose] REMOTE"
17
+    warn "usage: git $(basename "$0") [-v|--verbose] REMOTE"
14
     exit 0
18
     exit 0
15
 }
19
 }
16
 
20