From a846d05876132a6cda2282674eab256b91e54296 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Thu, 17 Apr 2025 20:44:20 -0400 Subject: [PATCH] new pattern for vim edits this one fixes the old school bash line that looks like this: #!/bin/bash to look like the more modern version: #!/usr/bin/env bash also renamed the directory to be vim for uhh modernity. --- infobase/patterns/{vi => vim}/pattern_auto_replacement | 0 .../pattern_fix_commented_formal_parameters.txt | 0 .../patterns/vim/redoing_bash_first_line_using_vim.txt | 8 ++++++++ 3 files changed, 8 insertions(+) rename infobase/patterns/{vi => vim}/pattern_auto_replacement (100%) rename infobase/patterns/{vi => vim}/pattern_fix_commented_formal_parameters.txt (100%) create mode 100644 infobase/patterns/vim/redoing_bash_first_line_using_vim.txt diff --git a/infobase/patterns/vi/pattern_auto_replacement b/infobase/patterns/vim/pattern_auto_replacement similarity index 100% rename from infobase/patterns/vi/pattern_auto_replacement rename to infobase/patterns/vim/pattern_auto_replacement diff --git a/infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt b/infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt similarity index 100% rename from infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt rename to infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt diff --git a/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt b/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt new file mode 100644 index 00000000..9917f2a8 --- /dev/null +++ b/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt @@ -0,0 +1,8 @@ + +use this command on any that has the old school #!/bin/bash hardcoded at the top of the file. +although, hmmm, this actually replaces them throughout the file. hmmm. + +:1,$s/#!\/bin\/bash/#!\/usr\/bin\/env bash/ + + + -- 2.34.1