diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-09-24 14:55:52 +0300 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-09-24 14:55:52 +0300 |
| commit | 2b23aa02bcc88f7af3cb31d8a865f6912f7c8d41 (patch) | |
| tree | c2710fadcc65f6c45b310d5aeb1fa69288ec251d | |
| parent | 760afc0443ef745fc45bbc88fc65cb023b1f77d3 (diff) | |
| download | pfetch-2b23aa02bcc88f7af3cb31d8a865f6912f7c8d41.tar.gz | |
pfetch: only calculate alignment if function exists
| -rwxr-xr-x | pfetch | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -314,7 +314,8 @@ EOF # "info names" for output alignment. The option names and subtitles # match 1:1 so this is thankfully simple. for info; do - info_length=$((${#info} > info_length ? ${#info} : info_length)) + type "get_$info" >/dev/null && + info_length=$((${#info} > info_length ? ${#info} : info_length)) done # Iterate over the above list and run any existing "get_" functions. |
