lots of minor bug fixes and tweaks to the command line
This commit is contained in:
parent
e9fd963724
commit
21dce2784e
5 changed files with 131 additions and 95 deletions
|
|
@ -158,8 +158,13 @@ SelectionType.prototype.parse = function(str) {
|
|||
return new Conversion(matchedValue);
|
||||
}
|
||||
else {
|
||||
// This is something of a hack. settings
|
||||
if (this.noMatch) {
|
||||
this.noMatch();
|
||||
}
|
||||
|
||||
if (completions.length > 0) {
|
||||
var msg = 'Several possibilities' +
|
||||
var msg = 'Possibilities' +
|
||||
(str.length === 0 ? '' : ' for \'' + str + '\'');
|
||||
return new Conversion(null, Status.INCOMPLETE, msg, completions);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ var setting = new SelectionType({
|
|||
fromString: function(str) {
|
||||
lastSetting = settings.getSetting(str);
|
||||
return lastSetting;
|
||||
},
|
||||
noMatch: function() {
|
||||
lastSetting = null;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -76,7 +79,12 @@ var setting = new SelectionType({
|
|||
var settingValue = new DeferredType({
|
||||
name: 'settingValue',
|
||||
defer: function() {
|
||||
return lastSetting.type;
|
||||
if (lastSetting) {
|
||||
return lastSetting.type;
|
||||
}
|
||||
else {
|
||||
return types.getType('text');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue