regexshellgrepbbedit

Extract BBEdit search history into a shell script


I live off the regex search/replace in BBEdit. At times I cycle through a history of 8-9 search/replaces to convert a file.

Is there anyway to extract the BBEdit search/replace history?

Best would be to just have the history auto generate a shell script.

I realise I can copy them by hand, but by the time I realise I need it; I'm up to 7-9 rather complex regex blots that would just be annoying to hand copy and paste.

Any ideas warmly welcomed.


Solution

  • Found what I should have looked for from the beginning.

    com.barebones.bbedit.plist has an array entry FindDialog:SearchReplaceHistory

    This entry is an array of dicts that includes all settings for the search/replace.

    A simple tool can be spun to pull the data and convert in on the fly to a shell script.