Skip to content

Instantly share code, notes, and snippets.

@stevedylandev
Created April 23, 2024 03:20
Show Gist options
  • Save stevedylandev/2e804737d653f6b64c9c401c9af47b1c to your computer and use it in GitHub Desktop.
Save stevedylandev/2e804737d653f6b64c9c401c9af47b1c to your computer and use it in GitHub Desktop.
A small fish script to feed Oatmeal sessions into fzf and open them
function oatsesh
set selected_session (oatmeal sessions list | awk '{print substr($0, index($0, "latest, ") + 8)}' | fzf)
if test -n "$selected_session"
set full_line (oatmeal sessions list | grep "$selected_session")
set id_value (echo $full_line | grep -o '[a-f0-9]\{8\}-[a-f0-9]\{4\}' | head -n 1)
if test -n "$id_value"
oatmeal sessions open -i $id_value
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment