From 49f4838ba7718bc326d72df442ba707311256fd3 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Sun, 25 Feb 2018 13:02:51 +0100 Subject: [PATCH] [bash] bash_oar, shfmt run --- bash/bash_oar | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bash/bash_oar b/bash/bash_oar index 6bad33c..360f320 100644 --- a/bash/bash_oar +++ b/bash/bash_oar @@ -9,10 +9,9 @@ # - http://wiki-oar.imag.fr/index.php/Customization_tips # - http://wiki-oar.imag.fr/index.php/Oarsh_and_bash_completion -if [[ "$SHELL" = "/bin/bash" ]] ; then +if [[ $SHELL == "/bin/bash" ]]; then # oarsh completion - function _oarsh_complete_() - { + function _oarsh_complete_() { local word=${COMP_WORDS[COMP_CWORD]} local list list=$(uniq "$OAR_NODEFILE" | tr '\n' ' ') @@ -22,7 +21,7 @@ if [[ "$SHELL" = "/bin/bash" ]] ; then fi # Job + Remaining time -__oar_ps1_remaining_time(){ +__oar_ps1_remaining_time() { if [ -n "$OAR_JOB_WALLTIME_SECONDS" -a -n "$OAR_NODE_FILE" -a -r "$OAR_NODE_FILE" ]; then DATE_NOW=$(date +%s) DATE_JOB_START=$(stat -c %Y "$OAR_NODE_FILE") @@ -39,4 +38,3 @@ test -n "$INTERACTIVE" && test -n "$OAR_NODE_FILE" && ( echo "[OAR] Your nodes are:" sort "$OAR_NODE_FILE" | uniq -c | awk '{printf(" %s*%d\n",$2,$1)}END{printf("\n")}' | sed -e 's/,$//' ) || true -