File tree 2 files changed +518
-57
lines changed
2 files changed +518
-57
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,36 @@ Edit your `~/.bashrc` file and add the following lines:
31
31
``` bash
32
32
# Load 'bash-funcs' project
33
33
[[ -r /path/to/bash_funcs ]] && source /path/to/bash_funcs
34
+ [[ -n show_self_loading ]] && show_self_loading 2> /dev/null
34
35
```
35
36
36
37
Once done, you can call any included functions.
37
38
39
+ ### In ZSH instead of Bash
40
+
41
+ You can call any included functions from your ZSH shell as long as ` bash-funcs ` has been added to your ` ~/.bashrc ` files as explained above.
42
+
43
+ Here is how to do:
44
+
45
+ ``` console
46
+ $ bash -i -c ' <function_name> [args]'
47
+ ```
48
+
49
+ Example:
50
+
51
+ ``` console
52
+ $ bash -i -c ' show_device_temp'
53
+
54
+ Loaded 'bash_funcs' file
55
+ - From: /path/to/bash-funcs
56
+ - Version: 0.6.0
57
+
58
+ acpitz - 59°C - all good
59
+ pch_skylake - 81°C - critical
60
+ x86_pkg_temp - 62°C - getting hot
61
+
62
+ ```
63
+
38
64
## Arguments
39
65
40
66
Even if this file __ MUST__ be sourced to be used, it support the following arguments:
@@ -53,6 +79,10 @@ Flags:
53
79
54
80
> Note that there is a check included in the file that will be triggered if the 'exec' permission is being granted.
55
81
82
+ ## Thanks
83
+
84
+ Huge thanks to the work made by the THC group for the inspiration.
85
+
56
86
## Author
57
87
58
88
* __ Jiab77__
You can’t perform that action at this time.
0 commit comments