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.
Show HN: Scooter – Interactive find and replace in the terminal
21–30 of 81 posts
Re: Show HN: Scooter – Interactive find and replace in the terminal
#22Cool. I 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
#23A 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?
Re: Show HN: Scooter – Interactive find and replace in the terminal
#24I'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
#25Re: Show HN: Scooter – Interactive find and replace in the terminal
#26Earlier 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.
Re: Show HN: Scooter – Interactive find and replace in the terminal
#27Re: Show HN: Scooter – Interactive find and replace in the terminal
#28Re: Show HN: Scooter – Interactive find and replace in the terminal
#29Re: Show HN: Scooter – Interactive find and replace in the terminal
#30[flagged]