-
-
Save zzamboni/85366b60c79aaabf3b878716e7a116ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aliases = [&] | |
fn _load_alias [name file]{ | |
alias = [&] | |
-source $file | |
aliases[$name] = $alias[$name] | |
} | |
fn def [&verbose=false name @cmd]{ | |
file = $dir/$name.elv | |
echo "#alias:new" $name $@cmd > $file | |
echo 'alias['$name'] = [@_args]{' $@cmd '$@_args }' >> $file | |
if (not-eq $verbose false) { | |
echo (edit:styled "Defining alias "$name green) | |
} | |
_load_alias $name $file | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment