feat: add preview to swu selector
This commit is contained in:
parent
dfec21163a
commit
9b1e3b6bc9
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
programs.zsh.initContent = ''
|
||||
if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ];
|
||||
then
|
||||
|
@ -54,8 +53,11 @@
|
|||
local ssh_login="fusion"
|
||||
local update_file=''${1}
|
||||
|
||||
local fzf_preview='stat --printf "%n\nSize: %s bytes\nModified: %y" {}'
|
||||
|
||||
if [ -z ''${update_file} ]; then
|
||||
update_file=$(find build/tmp/deploy/images -name "*.swu" -type f | fzf --select-1)
|
||||
update_file=$(find build/tmp/deploy/images -name "*.swu" -type f \
|
||||
| fzf --select-1 --exit-0 --header "Select a update file" --preview=''${fzf_preview} --preview-window=top)
|
||||
fi
|
||||
|
||||
if [ -z ''${update_file} ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue