Skip to content
프로젝트

소개

undo any command

기타 프로젝트

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

NAME

Unco - undo any command

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 <index>

# redo a recorded change
% undo redo <index>

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_PRELOAD, 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.

INSTALLATION

cmake .
make
make install

SUB-COMMANDS

unco record

% unco record [--log=<path>] [--append] -- cmd args

The command executes given command while logging the changes.

--log=<path>

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

--append

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

unco history

% unco history [--ppid=<pid>] [--cmd=<cmd>] [--cwd=<dir>]

Displays the list of recorded commands with their associated indices.

--ppid=<pid>

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.

--cmd=<cmd>

filters the output to commands starting with given prefix

--cwd=<cwd>

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

unco undo

% unco undo [--print] <index_or_path>

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

--print

displays the changes to be performed instead of actually applying them

unco redo

% unco redo [--print] <index_or_path>

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

AUTHOR

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

LICENSE

MIT

관련 프로젝트 살펴보기

불러오는 중…