changeset 6:d35280c9b023

Add custom CLI tools
author zegervdv <zegervdv@me.com>
date Sun, 23 Feb 2014 18:52:12 +0100
parents 8975f7375c41
children 4f1add3c7606
files bin/git-conflict bin/mkreport zshrc
diffstat 3 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/git-conflict	Sun Feb 23 18:52:12 2014 +0100
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+# Find conflict markers in files
+# 2013, Zeger Van de Vannet
+
+use Term::ANSIColor;
+
+my $files = `git ls-files`;
+
+my @files = split "\n", $files;
+
+for $file (@files) {
+  open FILE, "$file" or die $!;
+  my @lines = <FILE>;
+  for $i (keys @lines) {
+    if ($lines[$i] =~ /\<{2,}/) {
+      $linenr = $i + 1;
+      print color("blue"), "$file", color("reset");
+      print ":";
+      print color("yellow"), "$linenr ", color("reset");
+      print "$lines[$i]";
+    }
+  }
+  close FILE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/mkreport	Sun Feb 23 18:52:12 2014 +0100
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Create a new latex report from template
+
+cp $HOME/.templates/report.tex .
+echo "Created report.tex"
--- a/zshrc	Sun Feb 23 18:18:15 2014 +0100
+++ b/zshrc	Sun Feb 23 18:52:12 2014 +0100
@@ -44,6 +44,7 @@
 export PATH="$(brew --prefix ruby)/bin:$PATH"
 export NODE_PATH="/usr/local/lib/node"
 export PATH="/usr/local/share/npm/bin:$PATH"
+export PATH=$PATH:$HOME/.bin
 eval "$(rbenv init -)"