mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-16 23:33:39 -05:00
Simplify fzf-conda-activate preview command expression
@@ -1545,12 +1545,9 @@ fzf-conda-activate () {
|
|||||||
--preview-window="right:30%" \
|
--preview-window="right:30%" \
|
||||||
--preview-label=" conda tree leaves " \
|
--preview-label=" conda tree leaves " \
|
||||||
--preview=$'
|
--preview=$'
|
||||||
line="{}";
|
conda tree -p {3} leaves |
|
||||||
line_arr=(${line:1:-1});
|
perl -F\'[^\\w-_]\' -lae \'print for grep /./, @F;\' |
|
||||||
env_prefix="${line_arr[2]}";
|
sort
|
||||||
conda tree -p "$env_prefix" leaves |
|
|
||||||
perl -F\'[^\\w-_]\' -lae \'print for grep /./, @F;\' |
|
|
||||||
sort
|
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user