mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:26:40 +00:00
feat(cursor): automatically mark script files as execuable on save
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user