From ba3bf6b078ddd56ce1b9aa758f0c169b2ae1575b Mon Sep 17 00:00:00 2001 From: Paul-Aime <36678697+Paul-Aime@users.noreply.github.com> Date: Wed, 1 Feb 2023 18:48:07 +0100 Subject: [PATCH] Simplify fzf-conda-activate preview command expression --- Examples.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Examples.md b/Examples.md index dc659ff..0f95a74 100644 --- a/Examples.md +++ b/Examples.md @@ -1545,12 +1545,9 @@ fzf-conda-activate () { --preview-window="right:30%" \ --preview-label=" conda tree leaves " \ --preview=$' - line="{}"; - line_arr=(${line:1:-1}); - env_prefix="${line_arr[2]}"; - conda tree -p "$env_prefix" leaves | - perl -F\'[^\\w-_]\' -lae \'print for grep /./, @F;\' | - sort + conda tree -p {3} leaves | + perl -F\'[^\\w-_]\' -lae \'print for grep /./, @F;\' | + sort ' ) )