From 6ce5b9bfcc9e6446d9739a5c4b76ff24bf1300ea Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Fri, 10 Jan 2025 20:44:59 +0100 Subject: [PATCH] feat(scripts): WIP - launcher to use with fzf and alacritty? --- bin/launcher.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bin/launcher.sh diff --git a/bin/launcher.sh b/bin/launcher.sh new file mode 100644 index 0000000..cd11c51 --- /dev/null +++ b/bin/launcher.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# launcher +# +# TODO: toujours mettre des \n entre les résultats ! + +res=() + +# Find all programs in $PATH. +res+=$(echo -n "$PATH" | xargs -d: -I{} -r -- find -L {} -maxdepth 1 -mindepth 1 -type f -executable -printf '%P\n' 2>/dev/null) +res+=$(echo -e "\ncoucou") + +for resultat in "${res[@]}"; do + echo "$resultat" +done | fzf|sh