After using $acmeshell for a while, I was really beginning to miss $%, which isn't ...
12 years, 1 month ago
(2012-11-26 03:42:21 UTC)
#2
After using $acmeshell for a while, I was really beginning to miss $%, which
isn't accessible in bash since % is job substitution in bourne shells.
I think supplying the filename as argv[0] is both natural and makes sense: you
are executing the snippet within the context of the file, so in a sense it is
argv[0].
Making it argv[0] does not make sense to me. The file is not what is ...
12 years, 1 month ago
(2012-11-26 03:47:41 UTC)
#3
Making it argv[0] does not make sense to me. The file is not what is
being executed. I would suggest making the file name available under a
different variable. $samfile would be a good, if slightly misnamed,
choice, because the file is already available under that name when
using sam's ! command. That is, where there is currently a putenv for
"%", add one for "samfile" too.
Russ
I can live with that. It also has the major advantage of being passed through ...
12 years, 1 month ago
(2012-11-26 03:55:24 UTC)
#6
I can live with that. It also has the major advantage of being passed through in
environments, so you can write scripts that are invoked with button-2 without
inspecting the acme environment through $winid (the file often being the only
thing you care about anyway).
*** Submitted as http://code.google.com/p/plan9port/source/detail?r=27ec22f7be57 *** acme: set $samfile (same as $%) during execution R=rsc CC=plan9port.codebot ...
12 years, 1 month ago
(2012-11-26 03:56:46 UTC)
#7
Issue 6854092: $acmeshell: supply filename in $0
Created 12 years, 1 month ago by marius.eriksen
Modified 12 years, 1 month ago
Reviewers:
Base URL:
Comments: 0