Created
          April 23, 2024 03:20 
        
      - 
      
- 
        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
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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