docs: def repl_main(args):
      """ replacer main """
      pattern = args.pattern
      repl = args.replacement
      regexp = re.compile(pattern)
  
      def repl_action(f):
          return replace_in_file(args, f, regexp, repl)
  
      if args.paths:
          for f in args.paths:
              repl_action(f)
      else:
          root = os.getcwd()
          walk_files(args, root, root, repl_action)