Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eckertalex/edgo
edgo - A minimal implementation of the classic Unix line editor ed written in Go.
https://github.com/eckertalex/edgo
clone ed editor go unix
Last synced: 8 days ago
JSON representation
edgo - A minimal implementation of the classic Unix line editor ed written in Go.
- Host: GitHub
- URL: https://github.com/eckertalex/edgo
- Owner: eckertalex
- Created: 2024-11-10T23:21:22.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-14T22:43:52.000Z (3 months ago)
- Last Synced: 2024-12-02T11:19:47.179Z (2 months ago)
- Topics: clone, ed, editor, go, unix
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# edgo
A minimal implementation of the classic Unix line editor `ed` written in Go.
## Usage
### Basic Operation
```bash
# Start with empty buffer
edgo# Edit a file
edgo filename.txt# Start with custom prompt
edgo -p "* "
```### Command Line Flags
- `-p string`: Set custom prompt (default "\*")
- `-v`: Display version information and exit### Example Session
```
$ edgo
*a
hello world
line two
.
*w file.txt
2
*q
```Please make sure to update tests as appropriate.
## TODO
- [ ] print buffer size on load
- [ ] don't show prompt when appending/inserting
- [ ] support basic error messages
- [ ] enable showing error messages with H similar to P
- [ ] Line ranges (e.g., `1,5p`)
- [ ] Search commands (`/pattern/`)
- [ ] Substitute command (`s/old/new/`)
- [ ] Copy/move lines
- [ ] Undo functionality