From 9ef4b5bb0a61e9cbc2b54e0b6d175c6864324cb4 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 1 Apr 2019 18:27:20 +0100 Subject: Support run_java I probably won't need this as I become more familiar with Java. --- configs/shared/zsh/functions.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configs/shared') diff --git a/configs/shared/zsh/functions.zsh b/configs/shared/zsh/functions.zsh index 8c751c64aaa8..26f81a3ca656 100644 --- a/configs/shared/zsh/functions.zsh +++ b/configs/shared/zsh/functions.zsh @@ -47,6 +47,15 @@ snipit() { echo "Copied \"$uri\" to your clipboard." } +# Java +run_java() { + # Usage: run_java path/to/file.java + # Intended to be similar in spirit to Haskell's `runhaskell`. + set -e + javac $1 + java ${1%.java} +} + # Aptitude apts() { # Searches aptitude package repository for $1, surrounding it in ^$ to ensure -- cgit 1.4.1