From 77643fec63c60b848c15b74367e8efa0924aa8c5 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 8 Mar 2023 10:04:25 +0100 Subject: Add nomad-shell function --- tw/home/files/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tw/home/files/zshrc b/tw/home/files/zshrc index 882cf60c..2382fa27 100644 --- a/tw/home/files/zshrc +++ b/tw/home/files/zshrc @@ -105,6 +105,9 @@ alias nomad-diskfree='NOMAD_TOKEN=$(pass cern/ci/nomad-bootstrap-token | head -1 alias levant='NOMAD_TOKEN=$(pass cern/ci/nomad-bootstrap-token | head -1) \levant' alias consul='CONSUL_HTTP_TOKEN=$(pass cern/ci/consul-bootstrap-token | head -1) \consul' alias vault='VAULT_TOKEN=$(pass cern/ci/vault-root-token | head -1) \vault' +nomad-shell () { + nomad alloc exec "$1" sh -c 'export TERM=xterm-256color HOME=$NOMAD_TASK_DIR PS1="\\u@\\h \\w \\\$ "; cd; exec bash -i' +} # Git aliases alias ga='git add' -- cgit v1.2.3