Live data from Hacker News

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

github.com

11–20 of 81 posts

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

#12
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…

[deleted]
Post reply on HN