Просмотр исходного кода

Report errors better with cal()

Alois Mahdal 2 лет назад
Родитель
Сommit
86d58cea76
1 измененных файлов: 8 добавлений и 0 удалений
  1. 8
    0
      dotfiles/config/bashum/main.bashrc

+ 8
- 0
dotfiles/config/bashum/main.bashrc Просмотреть файл

816
         64:*)
816
         64:*)
817
             command cal -M "$@"
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
     esac
827
     esac
820
 }
828
 }
821
 
829