fix jira function for terjira compatibility

This commit is contained in:
Morgan Wattiez 2019-08-18 17:18:09 +02:00
parent 3869bd3f78
commit b592f75809

View File

@ -65,10 +65,10 @@ function top_commands_full() {
history | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50 history | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50
} }
function istherenewissues() { function istherenewissues() {
LASTISSUE=$(newissues | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | head -n1 | awk '{print $2}') LASTISSUE=$(newissues | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | awk 'FNR==2{print $2}')
if [[ -f ".newjiraissue" ]] if [[ -f ".newjiraissue" ]]
then then
previous_jira_issue=$(cat ".newjiraissue") previous_jira_issue=$(cat ".newjiraissue" | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g') # the sed part is for removing output colors
if [ "$LASTISSUE" != "$previous_jira_issue" ]; then if [ "$LASTISSUE" != "$previous_jira_issue" ]; then
newissues newissues
else else