def yank_nth_arg(event):
    """
    Insert the first argument of the previous command. With an argument, insert
    the nth word from the previous command (start counting at 0).
    """
    n = (event.arg if event.arg_present else None)
    event.current_buffer.yank_nth_arg(n)
Insert the first argument of the previous command. With an argument, insert
    the nth word from the previous command (start counting at 0).