mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
sync
This commit is contained in:
25
dotfiles/sstent/.bash_completion
Normal file
25
dotfiles/sstent/.bash_completion
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user