Sha256: e2c10812619b1a49745aed21555e7e282103ea4f8b463a7d3c1681af6762cca2
Contents?: true
Size: 779 Bytes
Versions: 55
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true # @@redo desc 'Redo an undo command' long_desc 'Shortcut for `doing undo -r`, reverses the last undo command. Specify a count to redo multiple undos' arg_name 'COUNT' command :redo do |c| c.desc 'Specify alternate doing file' c.arg_name 'PATH' c.flag %i[f file], default_value: @wwid.doing_file c.desc 'Select from an interactive menu' c.switch %i[i interactive] c.action do |_global, options, args| file = options[:file] || @wwid.doing_file count = args.empty? ? 1 : args[0].to_i raise InvalidArgument, 'Invalid count specified for redo' unless count&.positive? if options[:interactive] Doing::Util::Backup.select_redo(file) else Doing::Util::Backup.redo_backup(file, count: count) end end end
Version data entries
55 entries across 55 versions & 1 rubygems