summaryrefslogtreecommitdiff
path: root/tw/home/files/zshrc
diff options
context:
space:
mode:
authorTimo Wilken2023-03-08 10:04:25 +0100
committerTimo Wilken2023-03-08 10:04:25 +0100
commit77643fec63c60b848c15b74367e8efa0924aa8c5 (patch)
tree29ce4d8958d274e66a4ffa3d9b2f99f6dbe1d207 /tw/home/files/zshrc
parent8be61c9933e88ab5ed02e643617cb71575876032 (diff)
Add nomad-shell function
Diffstat (limited to 'tw/home/files/zshrc')
-rw-r--r--tw/home/files/zshrc3
1 files changed, 3 insertions, 0 deletions
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'