feat(zsh): select kas file on fu-build
This commit is contained in:
parent
1f4ce59419
commit
69f965cdc8
1 changed files with 26 additions and 2 deletions
|
@ -15,11 +15,35 @@
|
|||
}
|
||||
|
||||
function fu-build {
|
||||
./kas-container build kas/kas-ttc-image-horsch.yml
|
||||
local fzf_preview='bat --color always --style plain {}'
|
||||
|
||||
kas_file=$(find kas -maxdepth 1 -type f -name "*image*.yml" \
|
||||
| fzf --select-1 --exit-0 --header "Select a image file" --preview ''${fzf_preview})
|
||||
|
||||
if [ -z ''${kas_file} ]; then
|
||||
echo "no file selected"
|
||||
return 1
|
||||
fi
|
||||
|
||||
./kas-container build ''${kas_file}
|
||||
}
|
||||
|
||||
function fu-build-dev {
|
||||
./kas-container build kas/kas-ttc-image-horsch-dev.yml
|
||||
local fzf_preview='bat --color always --style plain {}'
|
||||
|
||||
local kas_file=kas/kas-ttc-image-horsch-dev.yml
|
||||
|
||||
if [ ! -f ''${kas_file} ]; then
|
||||
kas_file=$(find kas -maxdepth 1 -type f -name "*image*.yml" \
|
||||
| fzf --select-1 --exit-0 --header "Select a image file" --preview ''${fzf_preview})
|
||||
fi
|
||||
|
||||
if [ -z ''${kas_file} ]; then
|
||||
echo "no file selected"
|
||||
return 1
|
||||
fi
|
||||
|
||||
./kas-container build ''${kas_file}
|
||||
}
|
||||
|
||||
function fu-reboot {
|
||||
|
|
Loading…
Reference in a new issue