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
|
@ -1,6 +1,5 @@
|
|||
alias hosts='sudo vim /etc/hosts'
|
||||
alias rebase='git fetch --all --prune --prune-tags && git rebase'
|
||||
alias run='./run'
|
||||
alias sshconfig='vim ~/.ssh/config'
|
||||
alias vim='nvim'
|
||||
|
||||
|
|
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…
Reference in a new issue