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 (#!
).
- 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.)
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.
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 #!
.
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
)
- Makes files executable using
chmod +x
- Preserves existing file extension
- Works with all script types