From: Chad Perrin Date: 2011-06-18T02:49:37+09:00 Subject: get execution name of program --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. Example: > alias foo=3D'/home/username/bin/foo.rb' What would I use to get a return value of "foo"? --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk37kBwACgkQ9mn/Pj01uKU80QCg5xrBjwxlI/0NSy2oG6XmsOcA BDsAnAxSlnBomlWMbNwMcrkUPHuGZPN0 =46VC -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--