@@ -75,76 +75,76 @@ private static String resolveAliases(String input, ShellContext context) {
7575
7676 private static final class CommandNames {
7777 private CommandNames () {}
78- private static final String DIR = "dir " ;
78+ private static final String ALIAS = "alias " ;
7979 private static final String CD = "cd" ;
80- private static final String ECHO = "echo" ;
81- private static final String MKDIR = "mkdir" ;
82- private static final String RMDIR = "rmdir" ;
83- private static final String COPY = "copy" ;
84- private static final String DEL = "del" ;
85- private static final String TYPE = "type" ;
80+ private static final String CLEARHISTORY = "clearhistory" ;
8681 private static final String CLS = "cls" ;
87- private static final String HELP = "help" ;
88- private static final String EXIT = "exit" ;
89- private static final String VER = "ver" ;
90- private static final String TITLE = "title" ;
9182 private static final String COLOR = "color" ;
92- private static final String HOSTNAME = "hostname" ;
93- private static final String WHOAMI = "whoami" ;
94- private static final String TOUCH = "touch" ;
95- private static final String TIME = "time" ;
96- private static final String TASKLIST = "tasklist" ;
97- private static final String TREE = "tree" ;
83+ private static final String COPY = "copy" ;
9884 private static final String DATE = "date" ;
85+ private static final String DEL = "del" ;
86+ private static final String DIR = "dir" ;
87+ private static final String ECHO = "echo" ;
88+ private static final String EXIT = "exit" ;
89+ private static final String HELP = "help" ;
9990 private static final String HISTORY = "history" ;
91+ private static final String HOSTNAME = "hostname" ;
92+ private static final String IPCONFIG = "ipconfig" ;
93+ private static final String MKDIR = "mkdir" ;
94+ private static final String PAUSE = "pause" ;
10095 private static final String PING = "ping" ;
101- private static final String TELNET = "telnet" ;
10296 private static final String PWD = "pwd" ;
103- private static final String UPTIME = "uptime" ;
104- private static final String CLEARHISTORY = "clearhistory" ;
105- private static final String IPCONFIG = "ipconfig" ;
106- private static final String ALIAS = "alias" ;
107- private static final String UNALIAS = "unalias" ;
10897 private static final String RENAME = "rename" ;
98+ private static final String RMDIR = "rmdir" ;
10999 private static final String SET = "set" ;
110100 private static final String SYSTEMINFO = "systeminfo" ;
111- private static final String PAUSE = "pause" ;
101+ private static final String TASKLIST = "tasklist" ;
102+ private static final String TELNET = "telnet" ;
103+ private static final String TIME = "time" ;
104+ private static final String TITLE = "title" ;
105+ private static final String TOUCH = "touch" ;
106+ private static final String TREE = "tree" ;
107+ private static final String TYPE = "type" ;
108+ private static final String UNALIAS = "unalias" ;
109+ private static final String UPTIME = "uptime" ;
110+ private static final String VER = "ver" ;
111+ private static final String WHOAMI = "whoami" ;
112112 }
113113
114114 private static void registerCommands (Map <String , Command > commands ) {
115- commands .put (CommandNames .DIR , new DirCommand ());
115+ commands .put (CommandNames .ALIAS , new AliasCommand ());
116116 commands .put (CommandNames .CD , new CdCommand ());
117- commands .put (CommandNames .ECHO , new EchoCommand ());
118- commands .put (CommandNames .MKDIR , new MkdirCommand ());
119- commands .put (CommandNames .RMDIR , new RmdirCommand ());
120- commands .put (CommandNames .COPY , new CopyCommand ());
121- commands .put (CommandNames .DEL , new DelCommand ());
122- commands .put (CommandNames .TYPE , new TypeCommand ());
117+ commands .put (CommandNames .CLEARHISTORY , new ClearHistoryCommand ());
123118 commands .put (CommandNames .CLS , new ClsCommand ());
124- commands .put (CommandNames .HELP , new HelpCommand (commands ));
125- commands .put (CommandNames .EXIT , new ExitCommand ());
126- commands .put (CommandNames .VER , new VersionCommand ());
127- commands .put (CommandNames .TITLE , new TitleCommand ());
128119 commands .put (CommandNames .COLOR , new ColorCommand ());
129- commands .put (CommandNames .HOSTNAME , new HostnameCommand ());
130- commands .put (CommandNames .WHOAMI , new WhoamiCommand ());
131- commands .put (CommandNames .TOUCH , new TouchCommand ());
132- commands .put (CommandNames .TIME , new TimeCommand ());
133- commands .put (CommandNames .TASKLIST , new TasklistCommand ());
134- commands .put (CommandNames .TREE , new TreeCommand ());
120+ commands .put (CommandNames .COPY , new CopyCommand ());
135121 commands .put (CommandNames .DATE , new DateCommand ());
122+ commands .put (CommandNames .DEL , new DelCommand ());
123+ commands .put (CommandNames .DIR , new DirCommand ());
124+ commands .put (CommandNames .ECHO , new EchoCommand ());
125+ commands .put (CommandNames .EXIT , new ExitCommand ());
126+ commands .put (CommandNames .HELP , new HelpCommand (commands ));
136127 commands .put (CommandNames .HISTORY , new HistoryCommand ());
128+ commands .put (CommandNames .HOSTNAME , new HostnameCommand ());
129+ commands .put (CommandNames .IPCONFIG , new IpConfig ());
130+ commands .put (CommandNames .MKDIR , new MkdirCommand ());
131+ commands .put (CommandNames .PAUSE , new PauseCommand ());
137132 commands .put (CommandNames .PING , new PingCommand ());
138- commands .put (CommandNames .TELNET , new TelnetCommand ());
139133 commands .put (CommandNames .PWD , new PwdCommand ());
140- commands .put (CommandNames .UPTIME , new UptimeCommand ());
141- commands .put (CommandNames .CLEARHISTORY , new ClearHistoryCommand ());
142- commands .put (CommandNames .IPCONFIG , new IpConfig ());
143- commands .put (CommandNames .ALIAS , new AliasCommand ());
144- commands .put (CommandNames .UNALIAS , new UnaliasCommand ());
145134 commands .put (CommandNames .RENAME , new RenameCommand ());
135+ commands .put (CommandNames .RMDIR , new RmdirCommand ());
146136 commands .put (CommandNames .SET , new SetCommand ());
147137 commands .put (CommandNames .SYSTEMINFO , new SysteminfoCommand ());
148- commands .put (CommandNames .PAUSE , new PauseCommand ());
138+ commands .put (CommandNames .TASKLIST , new TasklistCommand ());
139+ commands .put (CommandNames .TELNET , new TelnetCommand ());
140+ commands .put (CommandNames .TIME , new TimeCommand ());
141+ commands .put (CommandNames .TITLE , new TitleCommand ());
142+ commands .put (CommandNames .TOUCH , new TouchCommand ());
143+ commands .put (CommandNames .TREE , new TreeCommand ());
144+ commands .put (CommandNames .TYPE , new TypeCommand ());
145+ commands .put (CommandNames .UNALIAS , new UnaliasCommand ());
146+ commands .put (CommandNames .UPTIME , new UptimeCommand ());
147+ commands .put (CommandNames .VER , new VersionCommand ());
148+ commands .put (CommandNames .WHOAMI , new WhoamiCommand ());
149149 }
150150}
0 commit comments