Skip to content

Instantly share code, notes, and snippets.

@abathur
Last active June 26, 2020 23:03
Show Gist options
  • Save abathur/3c60b874354404698b48f52c7da53658 to your computer and use it in GitHub Desktop.
Save abathur/3c60b874354404698b48f52c7da53658 to your computer and use it in GitHub Desktop.
refactoring to fix aliases finally bearing fruit...
# don't try to run me; I'll probably crash or hang or something
# I'm just a succinct test for complex resolution logic...
alias ls="ls -l" # the function
alias stat="stat -f" # external!
function ls(){
ls -a # the alias :P
}
ls # I'm the alias
command ls # external
stat # alias
command stat # external
$ RESHOLVE_PATH=$PATH ./resholver < tests/alias_riddle.sh
# don't try to run me; I'll probably crash or hang or something
# I'm just a succinct test for complex resolution logic...
alias ls="ls -l" # the function
alias stat="/nix/store/hz71p4lbzhn90vi9yacxyw42b5baiyl2-coreutils-8.31/bin/stat -f" # external!
function ls(){
ls -a # the alias :P
}
ls # I'm the alias
command /nix/store/hz71p4lbzhn90vi9yacxyw42b5baiyl2-coreutils-8.31/bin/ls # external
stat # alias
command /nix/store/hz71p4lbzhn90vi9yacxyw42b5baiyl2-coreutils-8.31/bin/stat # external
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment