feat(run): allow run files in notes directories
Move `run` from a simple alias to a function which checks a for a `.notes/run` file first or defaults back to the previous functionality and uses a file in the current directory.
This commit is contained in:
parent
66b491395d
commit
dc79ebf5a7
2 changed files with 8 additions and 1 deletions
8
roles/zsh/files/config/functions/run
Normal file
8
roles/zsh/files/config/functions/run
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Execute a "run" file either within ".notes" or the current directory.
|
||||
function run {
|
||||
if [[ -f .notes/run ]]; then
|
||||
.notes/run "${@}"
|
||||
elif [[ -f run ]]; then
|
||||
./run "${@}"
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue