unco

undo any command

  • Owner: kazuho/unco
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

=head1 NAME

Unco - undo any command

=head1 SYNOPSIS

record changes to files made by cmd

% unco record -- cmd args

display a list of recorded commands

% unco history

undo a recorded change

% unco undo

redo a recorded change

% undo redo

=head1 DESCRIPTION

Unco is a wrapper program that records the changes made to files by programs so
that they can be undone laterwards.

It uses a technique called library preloading (for more information consult the
linux documents with keyword LD_PROLOAD, or os x document with keyword
DYLD_INSERT_LIBRARIES) to trap the library calls that affect the files, and
records the changes made by the programs being executed.

=head1 INSTALLATION

cmake .
make
make install

=head1 SUB-COMMANDS

=head2 unco record

% unco record [--log=] [--append] -- cmd args

The command executes given command while logging the changes.

=head3 --log=

specifies the location of the log (if omitted, the log is stored under
$HOME/.unco with appropriate index)

=head3 --append

used together with --log for appending the changes to the log (default
behavior is truncate)

=head2 unco history

% unco history [--ppid=] [--cmd=] [--cwd=]

Displays the list of recorded commands with their associated indices.

=head3 --ppid=

filters the output to commands that were spawned by given process id. If
omitted, the default value is the process id that spawned the history command,
so that only the records belonging to the current shell are being displayed.
Set -1 as the argument to display all records.

=head3 --cmd=

filters the output to commands starting with given prefix

=head3 --cwd=

filters the output to commands that were spawn under given working directory

=head2 unco undo

% unco undo [--print] <index_or_path>

Undoes a recorded change. The argument is the index number displayed by
L</unco history> or path pointing to a unco record.

=head3 --print

displays the changes to be performed instead of actually applying them

=head2 unco redo

% unco redo [--print] <index_or_path>

Redoes a recorded change that has been undone. The index is the number
displayed by L</unco history> or path pointing to a unco record.

=head1 AUTHOR

Kazuho Oku Lhttps://github.com/kazuho/

=head1 LICENSE

MIT

=cut

Main metrics

Overview
Name With Ownerkazuho/unco
Primary LanguageC
Program languageC (Language Count: 5)
Platform
License:
所有者活动
Created At2014-03-25 09:26:53
Pushed At2023-03-17 15:29:31
Last Commit At2019-09-23 09:56:26
Release Count1
Last Release Namev0.2.0 (Posted on )
First Release Namev0.2.0 (Posted on )
用户参与
Stargazers Count239
Watchers Count11
Fork Count12
Commits Count106
Has Issues Enabled
Issues Count12
Issue Open Count6
Pull Requests Count2
Pull Requests Open Count2
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private