Skip to content

Commit

Permalink
zsh: Add ping-gw()
Browse files Browse the repository at this point in the history
  • Loading branch information
jody-frankowski committed Jun 20, 2024
1 parent 70cca69 commit 2bbf790
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zsh/.zshrc.d/functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,16 @@ pacs () {
rehash
}

ping-gw () {
if _onmacos; then
gw="$(netstat -nr G default G en0 COL 2)"
else
gw="$(route -n G 'UG\b' COL 2)"
fi

ping "${gw}"
}

if _onmacos; then
plutil-to-json () {
if [[ $# -lt 1 ]]; then
Expand Down

0 comments on commit 2bbf790

Please sign in to comment.