Browse Source

Report errors better with cal()

Alois Mahdal 9 months ago
parent
commit
86d58cea76
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      dotfiles/config/bashum/main.bashrc

+ 8
- 0
dotfiles/config/bashum/main.bashrc View File

@@ -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