[flagged]
Show HN: Scooter – Interactive find and replace in the terminal
11–20 of 81 posts
Re: Show HN: Scooter – Interactive find and replace in the terminal
#12I'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…
Re: Show HN: Scooter – Interactive find and replace in the terminal
#13[flagged]
Re: Show HN: Scooter – Interactive find and replace in the terminal
#14Re: Show HN: Scooter – Interactive find and replace in the terminal
#15[flagged]
Re: Show HN: Scooter – Interactive find and replace in the terminal
#16[flagged]
Re: Show HN: Scooter – Interactive find and replace in the terminal
#17[flagged]
Re: Show HN: Scooter – Interactive find and replace in the terminal
#18It opens the current command line in $EDITOR, which often defaults to vim.
Re: Show HN: Scooter – Interactive find and replace in the terminal
#19I assumed it uses ripgrep (or the underlying walkdir) because that's the established high-performance tool for this. But apparently not.
Re: Show HN: Scooter – Interactive find and replace in the terminal
#20A 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.