Either $0 or FILE will return a filename to give context for how a
Ruby program is executed, but I have yet to figure out how to get the
command used to execute it. Specifically, I want the command without
options. If a program is executed using an alias from within a Unix
shell, for instance, I want the alias name.
> alias foo='/home/username/bin/foo.rb'
What would I use to get a return value of “foo”?