Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rough implementation of rungather (ie qx and qqx).

  • Loading branch information...
commit 50e27f480f24e4326ec0052c20e6d481c269c11f 1 parent 15bcd26
@colomon colomon authored
Showing with 10 additions and 1 deletion.
  1. +9 −0 lib/Builtins.cs
  2. +1 −1  lib/CORE.setting
View
9 lib/Builtins.cs
@@ -1735,6 +1735,15 @@ public partial class Builtins {
*/ return result ? 1 : 0;
}
+ public static string command_qx(string command_line) {
+ Type Process = Type.GetType("GLib.Process,glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f");
+ MethodInfo spawn_sync = Process.GetMethod("SpawnCommandLineSync");
+
+ object[] arguments = new object[]{ command_line, null, null, null };
+ bool result = (bool) spawn_sync.Invoke(null, arguments);
+ return result ? (string) arguments[1] : "";
+ }
+
public static int path_chmod(string path, double mode) {
return PosixWrapper.chmod(path, (int) mode);
}
View
2  lib/CORE.setting
@@ -3236,7 +3236,7 @@ sub eval($str,:$lang="perl6") is return-pass {
}
}
-sub rungather($ ) { die "Run NYI" }
+sub rungather($command_line) { Q:CgOp { (box Str (command_qx (obj_getstr {$command_line}))) } }
# a rather strange grammar. All of its rules are tokens, and some of them
# will die().
Please sign in to comment.
Something went wrong with that request. Please try again.