Пример #1
0
        public unsafe static uint _PATHLAST([MarshalAs(UnmanagedType.LPTStr)] StringBuilder sb)
        {
            // get current folder
            var path  = TccCommands.ExpandVariables("%CD");
            var parts = path.Split('\\');

            sb.Replace(String.Join("/", parts.Reverse().Take(2).Reverse()));
            return(0);
        }
Пример #2
0
        static TildeSupportPlugin()
        {
            TccEventManager.Register(new PluginInfo
            {
                Author      = "James Treworgy",
                Description = "Add tilde support on some commands",
                Email       = "*****@*****.**",
                ModuleName  = "?",
                WebSite     = "https://github.com/jamietre/tcc-plugin"
            });

            Tcc         = new TccCommands();
            Tcc.MapPath = Helpers.MapPath;

            Loader = new ExternalLoader(Tcc);

            //LoadAssemblies();
        }
Пример #3
0
        static TildeSupportPlugin()
        {
            TccEventManager.Register(new PluginInfo
            {
                Author = "James Treworgy",
                Description = "Add tilde support on some commands",
                Email = "*****@*****.**",
                ModuleName = "?",
                WebSite = "https://github.com/jamietre/tcc-plugin"

            });

            Tcc = new TccCommands();
            Tcc.MapPath = Helpers.MapPath;

            Loader = new ExternalLoader(Tcc);

            //LoadAssemblies();
        }
Пример #4
0
        public static string MapPath(string path)
        {
            if (path.StartsWith("~"))
            {
                path = TccCommands.ExpandVariables("%HOMEDRIVE%%HOMEPATH%") + path.Substring(1);
            }

            path = FixSlashes(path);

            if (path[0] == '\\' && path.Length > 1 && IsAlpha(path[1]) &&
                (path.Length == 2 || (path.Length > 2 && path[2] == '\\')))
            {
                path = path[1] + ":\\" + (path.Length > 3 ?
                                          path.Substring(3) :
                                          "");
            }

            return(path);
        }
Пример #5
0
 public ExternalLoader(TccCommands tcc)
 {
     Tcc = tcc;
 }
Пример #6
0
 public ExternalLoader(TccCommands tcc)
 {
     Tcc = tcc;
 }
Пример #7
0
 public ProcessInfo(TccCommands tcc)
 {
     Tcc = tcc;
 }
Пример #8
0
 public ProcessInfo(TccCommands tcc)
 {
     Tcc = tcc;
 }