mirror of
https://github.com/dylanaraps/pfetch.git
synced 2026-01-03 00:12:11 +01:00
pfetch: Add --version. Closes #47
This commit is contained in:
5
pfetch
5
pfetch
@@ -1455,6 +1455,11 @@ get_ascii() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
[ "$1" = --version ] && {
|
||||||
|
printf 'pfetch 0.7.0\n'
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
# Hide 'stderr' unless the first argument is '-v'. This saves
|
# Hide 'stderr' unless the first argument is '-v'. This saves
|
||||||
# polluting the script with '2>/dev/null'.
|
# polluting the script with '2>/dev/null'.
|
||||||
[ "$1" = -v ] || exec 2>/dev/null
|
[ "$1" = -v ] || exec 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user