mirror of
https://github.com/jimeh/vscode-make-executable-if-script.git
synced 2025-12-19 22:36:44 +00:00
main
Make Executable If Script
Warning
This extension is currently a unfinished work in progress, and mostly written by AI. The idea was simply to get a very quick intro to VSCode extension development, with a goal of actually diving deeper to understand things properly at a later date.
A VSCode extension that automatically makes files executable when they start
with a hashbang (#!).
Features
- Automatically marks files as executable when saved if they start with
#!(enabled by default). - Manual command to mark current file as executable if it has a hashbang.
- Shows permission changes in a non-intrusive way.
- Works with any script type (bash, python, perl, etc.)
Usage
Automatic Mode (Default)
By default, any file you save that starts with #! will automatically be made
executable if it isn't already. For example:
#!/bin/bash
echo "Hello World"
Save the file, and it will automatically be made executable.
Manual Mode
You can also manually mark a file as executable:
- Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
- Type "Make Executable If Script"
- Press Enter
The command will only make the file executable if it starts with #!.
Extension Settings
This extension contributes the following settings:
make-executable-if-script.autoMarkOnSave: Enable/disable automatic marking of files as executable on save (default:true)make-executable-if-script.silent: Suppress notifications when files are made executable (default:false)
Platform Support
Unix-like Systems (macOS, Linux)
- Makes files executable using
chmod +x - Preserves existing file extension
- Works with all script types
Description
A VSCode extension that automatically makes files executable when they start with a hashbang (#!).
Languages
TypeScript
64.7%
JavaScript
35.3%