@@ -616,7 +616,7 @@ def access(self, i, out = None):
616
616
if automation == '' :
617
617
return {'return' :4 , 'error' :'automation was not specified' }
618
618
else :
619
- return {'return' :4 , 'error' :'automation {} not found' .format (automation )}
619
+ return {'return' :4 , 'error' :'automation "{}" not found' .format (automation )}
620
620
621
621
# If no automation was found or we force common automation
622
622
if use_common_automation or len (automation_lst )== 0 :
@@ -857,6 +857,8 @@ def x(self, i, out = None):
857
857
if control .pop ('f' , '' ):
858
858
i ['f' ] = True
859
859
860
+ output_json = (control .get ('j' , False ) or control .get ('json' , False ))
861
+
860
862
self_time = control .get ('time' , False )
861
863
if not x_was_called and self_time :
862
864
import time
@@ -978,7 +980,7 @@ def x(self, i, out = None):
978
980
print ('' )
979
981
print ('CMX elapsed time: {:.3f} sec.' .format (self_time ))
980
982
981
- if self . output == 'json' :
983
+ if output_json :
982
984
utils .dump_safe_json (r )
983
985
984
986
# Restore directory of call
@@ -1014,9 +1016,10 @@ def _x(self, i, control):
1014
1016
if output == True :
1015
1017
output = 'con'
1016
1018
1017
- # Check and force json console output
1018
- if control .get ('j' , False ) or control .get ('json' , False ):
1019
- output = 'json'
1019
+ # Changed in v3.2.5
1020
+ # # Check and force json console output
1021
+ # if control.get('j', False) or control.get('json', False):
1022
+ # output = 'json'
1020
1023
1021
1024
# Set self.output to the output of the very first access
1022
1025
# to print error in the end if needed
@@ -1050,6 +1053,17 @@ def _x(self, i, control):
1050
1053
elif action == 'init' and automation == '' :
1051
1054
automation = 'core'
1052
1055
1056
+ # Can add popular shortcuts
1057
+ elif action == 'ff' :
1058
+ task = ''
1059
+ if automation != '' and (' ' in automation or ',' in automation ):
1060
+ task = automation
1061
+ if ' ' in automation : task = automation .replace (' ' ,',' )
1062
+ i ['task' ] = task
1063
+ automation = 'flex.flow'
1064
+ action = 'run'
1065
+ i ['automation' ] = automation
1066
+ i ['action' ] = action
1053
1067
1054
1068
# Print basic help if action == ''
1055
1069
extra_help = True if action == 'help' and automation == '' else False
@@ -1291,7 +1305,7 @@ def _x(self, i, control):
1291
1305
if automation == '' :
1292
1306
return {'return' :4 , 'error' :'automation was not specified' }
1293
1307
else :
1294
- return {'return' :4 , 'error' :f'automation { automation } not found' }
1308
+ return {'return' :4 , 'error' :f'automation " { automation } " not found' }
1295
1309
1296
1310
# If no automation was found or we force common automation
1297
1311
loaded_common_automation = False
0 commit comments