about summary refs log tree commit diff
path: root/configs/shared
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-05-13T15·37+0100
committerWilliam Carroll <wpcarro@gmail.com>2019-05-13T15·37+0100
commit5cb0aebbd332ffd6d68fe2a976b38e64f9e073aa (patch)
tree582db561eb1d3fd224aff9b05550f5b828d2b603 /configs/shared
parent011d302b9eed55ac92422c631432e0563b091a61 (diff)
Support sandboxes for Elixir, Haskell, Clojure
The dream is to create an offline version of something like repl.it.
Diffstat (limited to 'configs/shared')
-rw-r--r--configs/shared/zsh/aliases.zsh7
-rw-r--r--configs/shared/zsh/functions.zsh12
2 files changed, 8 insertions, 11 deletions
diff --git a/configs/shared/zsh/aliases.zsh b/configs/shared/zsh/aliases.zsh
index e08af926ea50..e86667fc2f3f 100644
--- a/configs/shared/zsh/aliases.zsh
+++ b/configs/shared/zsh/aliases.zsh
@@ -88,7 +88,10 @@ alias tism="MIX_ENV=test iex -S mix"
 alias mdg="mix deps.get"
 alias mdu="mix deps.update"
 alias mdup="mix docker.up"
-alias sandbox_ex='dkish elixir iex' # depends on the docker aliases
+alias repl_ex='dkish elixir iex' # depends on the docker aliases
+
+# Clojure
+alias repl_clj='dkish clojure lein repl'
 
 # GPG
 alias gpged='gpg --edit-key wpcarro@gmail.com'
@@ -135,7 +138,7 @@ alias se="stack exec --"
 alias sc="stack clean"
 # alias st="stack test" # blocks suckless-terminal
 alias haddocks='open "$(stack path --local-doc-root)/index.html"'
-alias sandbox_hk='dkish haskell ghci'
+alias repl_hk='dkish haskell ghci'
 
 # Kubernetes
 alias kc="kubectl"
diff --git a/configs/shared/zsh/functions.zsh b/configs/shared/zsh/functions.zsh
index 4c395897d660..b72ca582d639 100644
--- a/configs/shared/zsh/functions.zsh
+++ b/configs/shared/zsh/functions.zsh
@@ -104,15 +104,9 @@ dkcsh() {
 }
 
 dkish() {
-  # Runs a Docker container with `/usr/bin/env bash`.
-  # `dkish` stands for DocKer Image SHell.
-  # Note: This defers from `dksh`, which accepts a container instead of an
-  # image.
-  # Usage: dkrit <container_name> [command]
-  image=$1
-  cmd=${2-/bin/bash}
-
-  docker run -it "$image" "$cmd"
+  # Runs a Docker container interactively
+  # Usage: dkrit <container_name> <command> [...args]
+  docker run -it $@
 }
 
 # Emacs