Could you extract this function to another filed called `percol_select_history.fish`? Functions are better defined on its own file.