Skip to content

Commit e4f6427

Browse files
committed
Update README.md
1 parent 7fa257c commit e4f6427

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
### *PYTHON EDitor: cli to edit lines via Python expressions*
44

5-
> For Pythonistas tired of forgetting the syntax of `sed`/`awk`/`grep`/`tr`
5+
> For Pythonistas tired of forgetting the syntax/options of `sed`/`awk`/`grep`/`tr`
66
7-
### ⬇️ install
7+
## install
88
```bash
99
pip install pythoned
1010
```
1111
(it sets up `pythoned` in your PATH)
1212

13-
### ✒️ edit
14-
One must simply provide a Python `str` expression that manipulates the line in the `_` variable (an `str`):
13+
## edit
14+
One must simply provide a Python `str` expression, manipulating the line stored in the variable `_: str`:
1515

1616
```bash
1717
# get last char of each line
@@ -24,19 +24,19 @@ r
2424
r
2525
```
2626

27-
### 🛑 filter
27+
## filter
2828
If the expression is a `bool` instead of an `str`, then the lines will be filtered according to it:
2929
```bash
3030
# keep only lines whose length equals 3
31-
echo -e 'f00\nbar\nf00bar' | pythoned 'len(_) == 3'
31+
echo -e 'f00\nbar\nf00bar' | pythoned '"00" in _'
3232
```
3333
output:
3434
```
3535
f00
36-
bar
36+
f00bar
3737
```
3838

39-
### 📦 modules auto-import
39+
## modules
4040

4141
Modules are auto-imported, example with `re`:
4242
```bash
@@ -48,4 +48,4 @@ output:
4848
fXX
4949
bar
5050
fXXbar
51-
```
51+
```

0 commit comments

Comments
 (0)