You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# We need to find from the start of USER_DEBUG to the next non-debug line.
1254
1254
# Notice "b" is put on a line by itself, making it tricky to include in output
1255
1255
1256
-
sfdx force:apex:execute -u "${1}" -f /dev/stdin<<<"$apexCommand"|# Execute the statement inside a system.debug(). execute expects a file, so use <<< trick to make it seem like a file
1256
+
sfdx force:apex:execute -u "${1}" -f /dev/stdin<<<"$apexCommand"|# Execute the expression inside a system.debug(). execute expects a file, so use <<< trick to make it seem like a file
1257
1257
pcregrep -M 'USER_DEBUG(.|\n)+?([\d]{2}:[\d]{2}:[\d]{2})'|# find debug line, and try to search up to the next apex ouptut line, starting with dd:dd:dd
1258
1258
sed '$d'|# remove the last line, which is the first non-debug line
1259
1259
sed 's/.*\|//'# find everything after the last pipe, which will be the debugged output
1260
1260
}
1261
1261
1262
+
# Execute an apex expression against an environment
1263
+
stmt() {
1264
+
if [[ -z"$1" ]] || [[ -z"$2" ]];then
1265
+
echo"Execute a statement or list of statements"
1266
+
echo"Pass quiet or q as the last paremeter to supress notification messages"
# We need to find from the start of USER_DEBUG to the next non-debug line.
1288
+
# Notice "b" is put on a line by itself, making it tricky to include in output
1289
+
1290
+
sfdx force:apex:execute -u "${1}" -f /dev/stdin<<<"$apexCommand"# Execute the statement inside a system.debug(). execute expects a file, so use <<< trick to make it seem like a file
1291
+
}
1292
+
1293
+
alias lsorg='open https://grhc.lightning.force.com/lightning/setup/DataManagementCreateTestInstance/home'
1294
+
functionorgid() {
1295
+
exp "$1"'UserInfo.getOrganizationId()'
1296
+
}
1297
+
1298
+
# Some normal junk
1299
+
fzf_opts="--multi --layout=reverse --border"
1300
+
1301
+
# Preview files to the right, in bat for colorizing
0 commit comments