Explorar el Código

Report errors better with cal()

Alois Mahdal hace 1 mes
padre
commit
86d58cea76
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8
    0
      dotfiles/config/bashum/main.bashrc

+ 8
- 0
dotfiles/config/bashum/main.bashrc Ver fichero

@@ -816,6 +816,14 @@ cal() {
816 816
         64:*)
817 817
             command cal -M "$@"
818 818
             ;;
819
+        127:*)
820
+            echo >&2 "cal(): cal command is not installed"
821
+            return 127
822
+            ;;
823
+        *)
824
+            echo >&2 "cal(): error: cal_es=$cal_es, cal_v=$cal_v"
825
+            return 5
826
+            ;;
819 827
     esac
820 828
 }
821 829