File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -19,34 +19,27 @@ source "${Dir}"/os.sh
19
19
# cols (int) > takes columns as arg.
20
20
# lines (int) > takes lines as arg.
21
21
inspect.ScreenSize (){
22
- # local ARGCols=101;
23
22
local ARGCols=" ${1} " ;
24
- # local ARGRou=39;
25
23
local ARGRou=" ${2} " ;
26
- # current columns in terminal.
27
- if ! screen.isSize " ${ARGCols} " " ${ARGRou} " ; then
24
+ screen.isSize " ${ARGCols} " " ${ARGRou} " || {
28
25
say.warn " Your Screen Size\n
29
26
\t\tColumns: '$( screen.cols) '\n
30
- \t\tLines: '$( screen.lines) '
31
- " ;
27
+ \t\tLines: '$( screen.lines) '" ;
32
28
say.success " Require Screen Size\n
33
29
\t\tColumns: '${ARGCols} '\n
34
- \t\tLines: '${ARGRou} '
35
- " ;
30
+ \t\tLines: '${ARGRou} '" ;
36
31
say.error " Please 'ZoomOut' your Terminal\n
37
32
\t\tThen run again." ;
38
33
exit 1;
39
- else
40
- return 0;
41
- fi
34
+ };
42
35
}
43
36
44
37
# inspect.is_func(function) -> str
45
38
# An extension of os.is_func.
46
39
inspect.is_func (){
47
- if ! os.is_func " ${1} " ; then
40
+ os.is_func " ${1} " || {
48
41
say.error " There is no '${1} '\n
49
42
\t\tShould to install it on your OS." ;
50
43
exit 1;
51
- fi
52
- }
44
+ } ;
45
+ }
You can’t perform that action at this time.
0 commit comments