Extract function in bc-tmux script