Skip to content

Commit

Permalink
better --version handler (os, shell)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekalinin committed Dec 29, 2018
1 parent c2301fa commit d2293b4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ gh_toc_app() {
if [ "$1" = '--version' ]; then
echo "$gh_toc_version"
echo
echo "Kernel:"
echo " `uname -a`"
for tool in curl wget grep awk sed; do
echo "os: `lsb_release -d | cut -f 2`"
echo "kernel: `cat /proc/version`"
echo "shell: `$SHELL --version`"
echo
echo "$tool:"
echo " `$tool --version | head -n 3`"
for tool in curl wget grep awk sed; do
printf "%-5s: " $tool
echo `$tool --version | head -n 1`
done
return
fi
Expand Down

0 comments on commit d2293b4

Please sign in to comment.