Live data from Hacker News

Show HN: Scooter – Interactive find and replace in the terminal

github.com

21–30 of 81 posts

Re: Show HN: Scooter – Interactive find and replace in the terminal

#22
post #19

Cool. I assumed it uses ripgrep (or the underlying walkdir) because that's the established high-performance tool for this. But apparently not.

It uses https://docs.rs/ignore/latest/ignore/ to walk dirs while respecting ignore files

Re: Show HN: Scooter – Interactive find and replace in the terminal

#23
post #21

A useful feature of bash and zsh is the "edit command". The standard shortcut is "ctrl-x ctrl-e". It opens the current command line in $EDITOR, which often defaults to vim.

That is very useful. What does it have to do with this?

If you want to search and replace a command line, there's tools to do it in your favourite editor.

Re: Show HN: Scooter – Interactive find and replace in the terminal

#24
post #7

I'm using this quickly put-together shell script called replace #!/usr/bin/env bash # Function to escape special characters for sed escape_sed_string() { printf '%s\n' "$1" | gsed -e 's/[]\/$*.^[]/\\&/g' } help() { gum style --foreground cyan --italic "\ Usage (everything optional, you will be prompted):\n\ $0\n\ --ext .js --ext .ts\n\ --from \"source string\"\n\ --to \"replacement string\"\n\ --dir somePath" } # Par…

[flagged]

Re: Show HN: Scooter – Interactive find and replace in the terminal

#25
post #21

Earlier quoted context omitted.

That is very useful. What does it have to do with this?

If you want to search and replace a command line, there's tools to do it in your favourite editor.

Ah, so you didn't click through and actually see what this tool is, you just read the title.

Re: Show HN: Scooter – Interactive find and replace in the terminal

#26
post #25

Earlier quoted context omitted.

If you want to search and replace a command line, there's tools to do it in your favourite editor.

Ah, so you didn't click through and actually see what this tool is, you just read the title.

I did click through, but misinterpreted what it was doing. Apologies, I'm "multitasking".

Re: Show HN: Scooter – Interactive find and replace in the terminal

#28
post #19

Cool. I assumed it uses ripgrep (or the underlying walkdir) because that's the established high-performance tool for this. But apparently not.

It uses https://docs.rs/ignore/latest/ignore/ to walk dirs while respecting ignore files

(And `ignore` uses `walkdir` internally)

Re: Show HN: Scooter – Interactive find and replace in the terminal

#29

Earlier quoted context omitted.

It uses https://docs.rs/ignore/latest/ignore/ to walk dirs while respecting ignore files

(And `ignore` uses `walkdir` internally)

For single threaded use cases. For multi-threaded, it has its own parallel directory traversal. :-)
Post reply on HN