Add --tiebreak option for customizing sort criteria

Close #191
This commit is contained in:
Junegunn Choi
2015-04-16 14:19:28 +09:00
parent 48ab87294b
commit b8904a8c3e
7 changed files with 139 additions and 18 deletions

5
fzf
View File

@@ -206,9 +206,10 @@ class FZF
@expect = true
when /^--expect=(.*)$/
@expect = true
when '--toggle-sort'
when '--toggle-sort', '--tiebreak'
argv.shift
when '--tac', '--sync', '--toggle-sort', /^--toggle-sort=(.*)$/
when '--tac', '--no-tac', '--sync', '--no-sync', '--hscroll', '--no-hscroll',
/^--toggle-sort=(.*)$/, /^--tiebreak=(.*)$/
# XXX
else
usage 1, "illegal option: #{o}"