Apply commands to both file contents and paths
Project description
full-apply
Apply commands to both file contents and paths.
Installation
pip3 install full-apply
Usage
$ full-apply --help
Usage: full-apply [OPTIONS] CMD PATHS...
Apply commands to both file contents and paths.
File paths and contents will be piped into the given shell command's
standard input and replaced with its output.
Examples:
Replace all occurrences of "foo" with "bar" in both paths and file contents
within the current directory and sub-directories (will prompt for
confirmation before actually making any changes):
$ full-apply -r "sed s/foo/bar/g" .
Arguments:
CMD shell command to apply [required]
PATHS... paths to apply to (recursively) [required]
Options:
-y, --yes apply changes without asking (dangerous!)
-n, --no don't apply changes and don't even ask
-H, --hidden go through "hidden" (dot-prefixed) files
--binary go through the contents of binary files
-r, --recursive recurse into directories
--move / --no-move move files [default: move]
--git-stage stage changes to files tracked by Git (NOTE: only works
when run within the Git repo, otherwise undefined
behavior)
--help Show this message and exit.
Changelog
0.7.3
- Introduced
--git-stageoption to automatically add changes to files to Git's index
0.7.2
- Introduced
--no-moveoption to disable moving files
0.7.0
- Now defaults to not going through the contents of binary files.
- Introduced
--binaryoption to re-enable the old behavior of doing so. - Fixed crash on diff output for files with non-UTF-8 contents.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
full_apply-0.7.3.tar.gz
(6.0 kB
view details)
File details
Details for the file full_apply-0.7.3.tar.gz.
File metadata
- Download URL: full_apply-0.7.3.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d8f01614b3341fe9e94a347717663d5b84feda7d1beb365596b822044abc988
|
|
| MD5 |
7c4aeb2aa50d50a6a7e03526c01b15fc
|
|
| BLAKE2b-256 |
39cedf2b30b3373edfecf8cd68e9dfab90432b96ee1b487fab3b069f61a52294
|