From fd6d4d86060c57bc4d78360d710517480426dad9 Mon Sep 17 00:00:00 2001 From: sstent Date: Mon, 22 Jan 2024 18:05:00 +0000 Subject: [PATCH] sync --- dotfiles/sstent/.bash_completion | 25 +++++++++++++++++++++++++ dotfiles/sstent/justfile | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 dotfiles/sstent/.bash_completion diff --git a/dotfiles/sstent/.bash_completion b/dotfiles/sstent/.bash_completion new file mode 100644 index 0000000..3481ae9 --- /dev/null +++ b/dotfiles/sstent/.bash_completion @@ -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 \ No newline at end of file diff --git a/dotfiles/sstent/justfile b/dotfiles/sstent/justfile index 090703d..2a5b565 100644 --- a/dotfiles/sstent/justfile +++ b/dotfiles/sstent/justfile @@ -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