예제 #1
0
 public void Exec(params string[] args)
 {
     if (args.Length < 1)
     {
         ShellEnvironment.WriteNormalLine(BuiltInResources.HelpMessage);
     }
     else
     {
     }
 }
        public void Exec(params string[] args)
        {
            int i = 1;

            foreach (var command in ShellEnvironment.Instance.CommandHistory)
            {
                ShellEnvironment.WriteNormalLine($"{i} {command}");
                i++;
            }
        }
예제 #3
0
 public void Exec(params string[] args)
 {
     if (args.Length < 1)
     {
         ShellEnvironment.WriteNormal($"History buffer size is {ShellEnvironment.Instance.HistoryBufferSize}");
     }
     else
     {
         if (ulong.TryParse(args[0], out ulong result))
         {
             if (result == 0)
             {
                 result = 1;
             }
             ShellEnvironment.Instance.HistoryBufferSize = result;
             ShellEnvironment.WriteNormalLine($"Set history buffer size to {result}");
         }
     }
 }
 public void Exec(params string[] args)
 {
     if (args.Length < 1)
     {
         ShellEnvironment.WriteNormalLine(Directory.GetCurrentDirectory());
     }
     else
     {
         string resolvedPathName = Path.GetFullPath(args[0]);
         if (!resolvedPathName.EndsWith(Path.DirectorySeparatorChar.ToString())) //Add a / on if we didn't do one.
         {
             resolvedPathName += Path.DirectorySeparatorChar;
         }
         try
         {
             Directory.SetCurrentDirectory(resolvedPathName);
         }
         catch (Exception ex)
         {
             ShellEnvironment.WriteErrorLine($"Could not set directory: {ex.Message}");
         }
     }
 }
예제 #5
0
 public void Exec(params string[] args)
 {
     ShellEnvironment.WriteNormalLine(Directory.GetCurrentDirectory());
 }