From 9fff448654308b1e1b3d1129c0255544f56c25cc Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 5 Oct 2022 16:33:10 +0100 Subject: initial --- fish/functions/get-location-from-ip.fish | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fish/functions/get-location-from-ip.fish (limited to 'fish/functions/get-location-from-ip.fish') diff --git a/fish/functions/get-location-from-ip.fish b/fish/functions/get-location-from-ip.fish new file mode 100644 index 0000000..1aea2f7 --- /dev/null +++ b/fish/functions/get-location-from-ip.fish @@ -0,0 +1,3 @@ +function get-location-from-ip --description 'Get location from IP addres' + curl -s https://ipvigilante.com/(curl -s https://ipinfo.io/ip) | jq '.data.latitude, .data.longitude, .data.city_name, .data.country_name' +end -- cgit v1.2.3