Skip to content

Commit

Permalink
Fix order of files with -g
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Apr 7, 2018
1 parent 59c52a5 commit e3ea070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/replacer
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class Action:
files = options.files
self._search = options.search
if options.grep:
options.files.append(options.replace)
options.files.insert(0, options.replace)
self._replace = options.replace = None
else:
self._replace = options.replace
Expand Down Expand Up @@ -591,7 +591,7 @@ def parse_args():
description = 'Interactively replace python regular expressions in files'
parser = argparse.ArgumentParser(description=description)
parser.add_argument('--version', '-V', action='version',
version='%(prog)s 0.1')
version='%(prog)s 0.2')
parser.add_argument('--before', '-B', type=int, default=0,
help=r'add lines of context before match')
parser.add_argument('--after', '-A', type=int, default=0,
Expand Down

0 comments on commit e3ea070

Please sign in to comment.