diff options
author | William Carroll <wpcarro@gmail.com> | 2019-04-01T17·27+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2019-04-01T17·27+0100 |
commit | 9ef4b5bb0a61e9cbc2b54e0b6d175c6864324cb4 (patch) | |
tree | f7da00e02d5a0e8f04c0cb9be028304b8166150a /configs | |
parent | 6a2d7ef035e54d81f818e65d8362caa06b3c2748 (diff) |
Support run_java
I probably won't need this as I become more familiar with Java.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/shared/zsh/functions.zsh | 9 |
1 files changed, 9 insertions, 0 deletions
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 |