This commit is contained in:
2024-01-22 18:05:00 +00:00
parent a2dc99d264
commit fd6d4d8606
2 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
# bash completion for bob -*- shell-script -*-
_nomad()
{
local cur prev words cword curdir
_init_completion || return
suffix=".nomad"
case $prev in
nomad_run|nomad_stop|nomad_exec_bash|nomad_exec_sh|nomad_purge)
curdir=$(pwd)
cd ~/projects/nomad/nomad_jobs/enabled/ 2>/dev/null && _filedir
for ((i=0; i<${#COMPREPLY[@]}; i++)); do
# COMPREPLY[$i]="${COMPREPLY[$i]/-module/module}"
COMPREPLY[$i]="${COMPREPLY[$i]%"$suffix"}"
done
cd "$curdir"
;;
esac
} &&
complete -F _nomad nomad_run
complete -F _nomad nomad_stop
complete -F _nomad nomad_exec_bash
complete -F _nomad nomad_exec_sh
complete -F _nomad nomad_purge

View File

@@ -41,10 +41,10 @@ nomad_stop SERVICE:
nomad_exec_bash SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/bash
nomad_sh SERVICE:
nomad_exec_sh SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/sh
run_nautilus:
run_nicotine:
mullvad connect
nix-shell -p nicotine-plus --command nicotine-plus
mullvad disconnect