commit e2e3bcb17c67d37c682556de4c067491f3d21e35 parent e3bfabc0c627f9635840b7f84bf56edb7fcf8a1d Author: Ed van Bruggen <edvb54@gmail.com> Date: Fri, 24 Oct 2014 15:50:53 -0700 Bin: Make edium.sh a hard link Diffstat:
bin/edium.sh | | | 2 | -- |
bin/edium.sh | | | 28 | ++++++++++++++++++++++++++++ |
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/bin/edium.sh b/bin/edium.sh @@ -1 +0,0 @@ -/home/ed/Code/Bash/edium/edium.sh- \ No newline at end of file diff --git a/bin/edium.sh b/bin/edium.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# ed: EDit file or folder with your EDITOR +# hey + +ed() { + if [[ "$@" == "" ]]; then + $EDITOR . + else + $EDITOR $@ + fi +} + +# ED: Rotate between EDITORs + +ED() { + local EDITOR_new + if [[ $EDITOR == "vim" ]]; then + EDITOR_new="emacs" + elif [[ $EDITOR == "emacs" ]]; then + EDITOR_new="vim" + fi + + echo "Setting EDITOR to $EDITOR_new" + EDITOR=$EDITOR_new + echo "EDITOR is now $EDITOR" +} +