You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x] I have read through the manual page (man fzf)
[ x] I have the latest version of fzf
[ x] I have searched through the existing issues
Info
OS
[ x] Linux
Mac OS X
Windows
Etc.
Shell
[ x] bash
zsh
fish
Problem / Steps to reproduce
I have a Kubernetes YAML configuration as shown below which is added as an alias in WSL bash. The OS is Ubuntu 22.04.
alias getyaml='function get_k8s_yaml() { kubectl get $1 -o=json | jq -r ".items[].metadata.name" | fzf --preview "kubectl get $1 {} -o=yaml" --preview-window=up:60% | xargs -I {} sh -c "kubectl get $1 {} -o=yaml | yq .";}; get_k8s_yaml'
This function accepts a resource type as an argument and displays the YAML-formatted value in a preview pane. I want to know if it's possible to search for specific text in the preview pane once the YAML-formatted text is displayed. Additionally, I've been unable to apply syntax highlighting to the preview pane using bat. Can someone help with these issues?
I also tried to pipe the output to bat but that didn't work.
alias getyaml='function get_k8s_yaml() {
kubectl get $1 -o=json | jq -r ".items[].metadata.name" | fzf --preview "kubectl get $1 {} -o=yaml | bat -l yaml" --preview-window=up:60% | xargs -I {} sh -c "kubectl get $1 {} -o=yaml | yq . | bat -l yaml";
}; get_k8s_yaml'
The text was updated successfully, but these errors were encountered:
man fzf
)Info
Problem / Steps to reproduce
I have a Kubernetes YAML configuration as shown below which is added as an alias in WSL bash. The OS is Ubuntu 22.04.
This function accepts a resource type as an argument and displays the YAML-formatted value in a preview pane. I want to know if it's possible to search for specific text in the preview pane once the YAML-formatted text is displayed. Additionally, I've been unable to apply syntax highlighting to the preview pane using
bat
. Can someone help with these issues?I also tried to pipe the output to bat but that didn't work.
alias getyaml='function get_k8s_yaml() {
kubectl get $1 -o=json | jq -r ".items[].metadata.name" | fzf --preview "kubectl get $1 {} -o=yaml | bat -l yaml" --preview-window=up:60% | xargs -I {} sh -c "kubectl get $1 {} -o=yaml | yq . | bat -l yaml";
}; get_k8s_yaml'
The text was updated successfully, but these errors were encountered: