dotfiles/roles/zsh/files/config/functions/run
Oliver Davies dc79ebf5a7 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.
2022-08-19 10:23:31 +01:00

9 lines
190 B
Plaintext

# 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
}