Get the latest tech news

Browsing Log Streams with Fzf


Browsing log streams with fzf # In order to allow changing queries and getting the updated results in real-time, fzf keeps the whole input list in memory and scans the list whenever the query changes. So if you attach fzf to an endless input stream, such as server logs, the memory usage will grow indefinitely and fzf will eventually crash. To work around this limitation, fzf provides --tail=NUM option that allows you to limit the number of items to keep in memory.

Use--tac to see the newest items up front You might want to use--no-sort option to keep the order of the items intact Without sorting, you’ll likely see many irrelevant matches, so try disabling fuzzy matching with--exact You can press ctrl-o to open the log in vim, and enter to execute kubectl exec on the selected pod. {1} in the bind expression denotes the first token of the current line, which is the name of the pod.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fzf

Fzf

Photo of Browsing Log Streams

Browsing Log Streams