I'm using rerun
and sinatra
enough that I wanted a nice alias so I could execute rerun ruby X.rb
where X was the current directory (ie: /Users/David/Documents/Projects/sample
=>rerun ruby sample.rb
).
The command I'm using (adapted from this question) is alias sin="rerun ruby ${PWD##*/}.rb"
. When I use that, it says ruby: No such file or directory -- David.rb (LoadError)
as if it was passed my user folder instead of the project folder.
However, when I manually source my .zshrc
(alias sz="source ~/.zshrc"
, which should be run on shell creation (and all my other aliases work fine, so I have no reason to believe it wouldn't be working)) and run sin
again, it totally works as intended.
Any ideas? I'm pretty new at bash scripting. Also, I'm using zsh if that's important.