This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (char **) makeargs:(NSMutableArray*) listArgv argc:(int*) argc | |
{ | |
// Assumes the command line has been separated into arguments, parse the arguments if needed | |
// does some conversions (~ --> home directory, for example, plus environment variables) | |
// Most of the heavy parsing is done in ios_system.m (check if command is a file, etc) | |
// If the command is "scp" or "sftp", do not replace "~" on remote file locations, but | |
// edit the arguments (we simulate scp and sftp by calling "curl scp://remotefile") | |
if ([listArgv count] == 0) { *argc = 0; return NULL; } | |
NSString* cmd = [listArgv objectAtIndex:0]; | |
// Re-concatenate arguments with quotes (' and ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array of all commands available: | |
NSArray* commandList; | |
// Commands that don't take a file as argument (uname, ssh, mosh...): | |
NSArray* commandsNoFile; | |
void completion(const char *command, linenoiseCompletions *lc) { | |
// autocomplete command for lineNoise | |
BOOL isDir; | |
NSString* commandString = [NSString stringWithUTF8String:command]; | |
if ([commandString rangeOfString:@" "].location == NSNotFound) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
curl http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz -O | |
tar xvzf llvm-6.0.0.src.tar.xz | |
rm llvm-6.0.0.src.tar.xz | |
cd llvm-6.0.0.src | |
# get clang | |
pushd tools | |
curl http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz -O |