From 1ef2937eb48718ccccc1beba645684e60062dfae Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 23 Feb 2025 16:37:15 +0000 Subject: [PATCH] feat(cursor): automatically mark script files as execuable on save --- cursor/extensions.lock | 3 ++- cursor/settings.json | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cursor/extensions.lock b/cursor/extensions.lock index 1e5d33c..0485a98 100644 --- a/cursor/extensions.lock +++ b/cursor/extensions.lock @@ -1,5 +1,5 @@ # Cursor Extensions -# Generated on Fri Feb 21 23:10:20 GMT 2025 +# Generated on Sun Feb 23 16:35:53 GMT 2025 alefragnani.project-manager@12.8.0 antiantisepticeye.vscode-color-picker@0.0.4 @@ -13,6 +13,7 @@ christian-kohler.path-intellisense@2.10.0 connorshea.vscode-ruby-test-adapter@0.9.2 ctf0.macros@1.1.1 dnut.rewrap-revived@1.16.3 +emeraldwalk.runonsave@0.2.7 exiasr.hadolint@1.1.2 fnando.linter@0.0.19 foxundermoon.shell-format@7.2.5 diff --git a/cursor/settings.json b/cursor/settings.json index 35c75ef..04ff60b 100644 --- a/cursor/settings.json +++ b/cursor/settings.json @@ -202,6 +202,7 @@ // =========================================================================== // Ruby // =========================================================================== + // Extensions: // - https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-extensions-pack // - https://marketplace.visualstudio.com/items?itemName=connorshea.vscode-ruby-test-adapter // @@ -268,6 +269,21 @@ ], // // =========================================================================== + // Run on Save callbacks + // =========================================================================== + // Extension URL: + // - https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave + // + "emeraldwalk.runonsave": { + "commands": [ + { // Automatically chmod +x script files (first two bytes are `#!`). + "match": ".*", + "cmd": "if [ ! -x \"${file}\" ] && head -n 1 \"${file}\" | grep -q '^#!'; then echo \"Marking ${relativeFile} as executable...\" && chmod +x \"${file}\"; fi" + } + ] + }, + // + // =========================================================================== // Macros // =========================================================================== // Extension URL: