From 631825bb08fc2703b54c9230e4d68b5392e61e5f Mon Sep 17 00:00:00 2001 From: HOLZSCHUCH Nicolas Date: Thu, 11 Jan 2018 09:13:13 +0100 Subject: [PATCH] Edited comments in MCPSession.m --- Sessions/MCPSession.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sessions/MCPSession.m b/Sessions/MCPSession.m index 6d43eac73..024423cd4 100644 --- a/Sessions/MCPSession.m +++ b/Sessions/MCPSession.m @@ -99,15 +99,14 @@ void initializeCommandListForCompletion() { NSMutableArray* combinedCommands = [commandsAsArray() mutableCopy]; // add commands from Blinkshell: [combinedCommands addObjectsFromArray:@[@"help",@"mosh",@"ssh",@"exit",@"ssh-copy-id",@"ssh-save-id",@"config"]]; + // sort alphabetically: commandList = [combinedCommands sortedArrayUsingSelector:@selector(compare:)]; commandsNoFile = @[@"help", @"mosh", @"ssh", @"exit", @"ssh-copy-id", @"ssh-save-id", @"config", @"setenv", @"unsetenv", @"printenv", @"pwd", @"uname", @"date", @"env", @"id", @"groups", @"whoami", @"uptime", @"w"]; } void completion(const char *command, linenoiseCompletions *lc) { // autocomplete command for lineNoise - // Number of spaces: BOOL isDir; - // the number of arguments is *at most* the number of spaces plus one NSString* commandString = [NSString stringWithUTF8String:command]; if ([commandString rangeOfString:@" "].location == NSNotFound) { // No spaces. The user is typing a command