Skip to content

Commit

Permalink
Edited comments in MCPSession.m
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Holzschuch committed Jan 11, 2018
1 parent e8a0e64 commit 631825b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sessions/MCPSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 631825b

Please sign in to comment.