From: Eric Sunshine Date: Sun, 05 May 2013 12:35:55 GMT Subject: Re: [PATCH v5 0/3] interactive git clean Message-ID: In-Reply-To: On Fri, May 3, 2013 at 9:06 PM, Jiang Xin wrote: > 2013/5/3 Eric Sunshine : >> More generally, is this sort of modal edit mode desirable and >> convenient? Can the edit operation be combined with the top-level >> prompt? For example: >> >> % git clean -i >> file1 file2 file3 >> file4 file5 file6 >> Remove ([y]es, [n]o, [p]rompt, exclusion-list)? file[4-6] >> file1 file2 file3 >> Remove ([y]es, [n]o, [p]rompt, exclusion-list)? p >> file1 (y/n/q/!)? y >> file2 (y/n/q/!)? n >> file3 (y/n/q/!)? y > > What If there is a file named 'y', and the user want to exclude it, > and press 'y' as a pattern. The pattern [y] will match file named 'y'. It probably is unusual for files named 'y', 'n', etc. to exist in the top-level directory, but the gitignore patterns already provide an escape hatch for these unusual cases. (That is not to say that this is the perfect example or solution, but only that it may be worth considering such options when designing the user-interface for convenience.)