summaryrefslogtreecommitdiff
path: root/README.org
blob: 1fec08c9427b082c86f646bf84d69323cab124bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
* CLI tools for [[https://blog.can.ac/2026/02/12/the-harness-problem][Hashline]]
** Included tools
+ hlcat :: A variant of =cat= that prints the hashline before each line
  #+begin_src sh :results verbatim
hlcat --help
  #+end_src

  #+RESULTS:
  #+begin_example
usage: hlcat [-h] [files ...]

Print file with hashline prefixes

positional arguments:
  files       Files to print (or stdin if none)

options:
  -h, --help  show this help message and exit
  #+end_example
+ hlgrep :: A variant of =grep= that prints the hashline before each line
    #+begin_src sh :results verbatim
hlgrep --help
  #+end_src
  #+RESULTS:
  #+begin_example
usage: hlgrep [-h] pattern [files ...]

Search for pattern in file with hashline prefixes

positional arguments:
  pattern     Regex pattern to search for
  files       Files to search (or stdin if none)

options:
  -h, --help  show this help message and exit
  #+end_example
+ hlpatch :: A hashline-based editing tool
    #+begin_src sh :results verbatim
hlpatch --help
  #+end_src
  #+RESULTS:
  #+begin_example
usage: hlpatch [-h] [--inplace INPLACE] {replace,append,prepend,delete} ...

Hashline-based editing tool

positional arguments:
  {replace,append,prepend,delete}
    replace             Replace lines
    append              Append lines after position
    prepend             Prepend lines before position
    delete              Delete lines

options:
  -h, --help            show this help message and exit
  --inplace, -i INPLACE
                        Write back to file after editing
  #+end_example
** Prior implementations
+ [[https://github.com/can1357/oh-my-pi/blob/main/packages/coding-agent/src/patch/hashline.ts][Oh-My-Pi]] (the original implementation, TypeScript)
+ [[https://github.com/dwash96/cecli/blob/main/cecli/helpers/hashline.py][Cecli (formerly Aider-CE)]] (Python)