zshrc: Move exirename to its own file
authorFrank Terbeck <ft@bewatermyfriend.org>
Mon, 28 Nov 2011 21:19:31 +0000 (22:19 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 6 Dec 2011 13:50:44 +0000 (14:50 +0100)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
etc/zsh/zshrc
usr_share_grml/zsh/functions/exirename [new file with mode: 0644]

index 22b3195..7311a22 100644 (file)
@@ -3424,25 +3424,6 @@ smart-indent() {
 check_com -c histring && \
     alias hidiff="histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'"
 
-# rename pictures based on information found in exif headers
-#f5# Rename pictures based on information found in exif headers
-exirename() {
-    emulate -L zsh
-    if [[ $# -lt 1 ]] ; then
-        echo 'Usage: jpgrename $FILES' >& 2
-        return 1
-    else
-        echo -n 'Checking for jhead with version newer than 1.9: '
-        jhead_version=`jhead -h | grep 'used by most Digital Cameras.  v.*' | awk '{print $6}' | tr -d v`
-        if [[ $jhead_version > '1.9' ]]; then
-            echo 'success - now running jhead.'
-            jhead -n%Y-%m-%d_%Hh%M_%f $*
-        else
-            echo 'failed - exiting.'
-        fi
-    fi
-}
-
 #f5# Change the xterm title from within GNU-screen
 xtrename() {
     emulate -L zsh
diff --git a/usr_share_grml/zsh/functions/exirename b/usr_share_grml/zsh/functions/exirename
new file mode 100644 (file)
index 0000000..2ab3b62
--- /dev/null
@@ -0,0 +1,18 @@
+# Rename pictures based on information found in exif headers
+emulate -L zsh
+
+if [[ $# -lt 1 ]] ; then
+    echo 'Usage: jpgrename $FILES' >& 2
+    return 1
+else
+    echo -n 'Checking for jhead with version newer than 1.9: '
+    jhead_version=`jhead -h | \
+                   grep 'used by most Digital Cameras.  v.*' | \
+                   awk '{print $6}' | tr -d v`
+    if [[ $jhead_version > '1.9' ]]; then
+        echo 'success - now running jhead.'
+        jhead -n%Y-%m-%d_%Hh%M_%f $*
+    else
+        echo 'failed - exiting.'
+    fi
+fi