zsh: Change m from an alias to a function

Change `m` from an alias to a function to allow for passing additional
parameters.
This commit is contained in:
Oliver Davies 2020-09-10 14:43:15 +01:00
parent 1f4852e8c6
commit 720f41b8b2
2 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,5 @@
alias c="clear"
alias l="ls -lah"
alias m="if [[ -f .notes/Makefile ]]; then make -f .notes/Makefile; else make; fi"
alias mkdir="mkdir -p"
alias s=symfony
alias v=vagrant

View file

@ -1,3 +1,12 @@
function m() {
if [[ -f .notes/Makefile ]];
then
make -f .notes/Makefile "$@"
else
make "$@"
fi
}
function mkd() {
mkdir -p "$@" && cd "$@"
}