command = "rm" [[match_err]] pattern = [ "no such file or directory", ] suggest = [ ''' {{command[0}} {{opt(-*)}} {{typo[-1](file)}}''' ] [[match_err]] pattern = [ "is a directory", ] suggest = [ ''' {{command[0]}} {{opt(-*)}} --recursive {{command[1:]}}''' ]