-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintenv.cs
More file actions
23 lines (21 loc) · 837 Bytes
/
Copy pathprintenv.cs
File metadata and controls
23 lines (21 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.IO;
using System.Collections;
using ILeoConsole;
using ILeoConsole.Plugin;
using ILeoConsole.Core;
namespace LeoConsole_ExamplePlugin {
public class Printenv : ICommand {
public string Name { get { return "printenv"; } }
public string Description { get { return "print the environment"; } }
public Action CommandFunction { get { return () => Command(); } }
public Action HelpFunction { get { return () => Console.WriteLine("not available"); } }
private string[] _Arguments;
public string[] Arguments { get { return _Arguments; } set { _Arguments = value; } }
public void Command() {
foreach (DictionaryEntry de in Environment.GetEnvironmentVariables()) {
Console.WriteLine("{0}={1}", de.Key, de.Value);
}
}
}
}
// vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab