https://github.com/andrewaguiar/rpx
A simple and more visual string searcher and replacer for programmers
https://github.com/andrewaguiar/rpx
cli-tool elixir-lang replace-text
Last synced: about 1 year ago
JSON representation
A simple and more visual string searcher and replacer for programmers
- Host: GitHub
- URL: https://github.com/andrewaguiar/rpx
- Owner: andrewaguiar
- License: mit
- Created: 2018-04-23T11:25:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T05:38:50.000Z (almost 2 years ago)
- Last Synced: 2025-02-28T06:09:08.901Z (about 1 year ago)
- Topics: cli-tool, elixir-lang, replace-text
- Language: Rust
- Homepage:
- Size: 9.09 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rpx (simple and extensible string replacer)
Rpx is a tool to provide simple string replacement to GIT controled projects, it is
a `sed` less powerfull but simpler.
## Motivation
Sometimes I wanted to perform some string replacement on several files, I used `sed` for this
but even though it works perfectly I missed some features like:
- Filtering only git files `git ls-files`.
- Visual preview of changes.
- Be able to cherry pick which files / lines would be changed.
So because this I decided to create my own tool for this.

## Installation
Just download the binary in `bin/rpx` and add it to the path
```shell
wget https://raw.githubusercontent.com/andrewaguiar/rpx/master/dist/rpx
chmod +x rpx
```
Or clone the project and make the binary
```shell
git clone git@github.com:andrewaguiar/rpx.git
cd rpx
./make_dist
```
Then add it to PATH
```shell
export PATH="$PATH:rpx_location/dist"
```
## Usage
Type `rpx` to see instructions.
```shell
NAME
rpx -- simple and powerfull string replacer based on non gitignore files
SYNOPSIS
rpx [replacement] [-f]
DESCRIPTION
Rpx scans all git ls-files recursively and shows all occurences of in each file, then it
asks for confirmation before replace all occurrences by .
The following options are available:
--filename | -f
Filters by absolute path name in any part (defaults '').
Example: "rpx AppController ApplicationController -f controllers" will consider only files with controllers
in absolute path like ("app/controllers/app_controllers.rb", "config/controllers.rb").
```
### Creating a bin
run `./make_dist` and the binary will be generated in `./dist`.