dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/dotfiles
Log | Files | Refs

commit 788571555e25a9c8a3583ead68e6275f2af87101
parent 7c2bb46f0a765cf3b36c39dab0af284f0fd07f80
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Sun,  3 Aug 2014 08:25:39 -0700

Add ed script

Diffstat:
bin/ed | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/bin/ed b/bin/ed @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# ed: EDit file or folder with your editor of choice +# +# If you don't supply a argument then it just edits the folder you're in with +# your $EDITOR, but if you do then it edits that file/ folder. It also +# automatically sets your $EDITOR to vim if you don't have it set already. + +if [ "$EDITOR" = "" ]; then + export EDITOR='vim' + echo "Warning: you do not have the EDITOR variable set" + echo "Temporary setting EDITOR to $EDITOR" +fi + +if [ "$1" = "" ]; then + $EDITOR . +else + $EDITOR $1 +fi