improve code
This commit is contained in:
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
# args:
|
# args:
|
||||||
# $1:
|
# $1:
|
||||||
# The IP address you want to query geo info for.
|
# The IP address you want to query geo info for.
|
||||||
# If no argument supplied, the host machine's ip will
|
# If no argument supplied, the host machine's ip will
|
||||||
# be used
|
# be used
|
||||||
# doc for api: https://ip-api.com/docs/api
|
# doc for api: https://ip-api.com/docs/api
|
||||||
|
DOT_FILE_DIR=$(dirname ${BASH_SOURCE[0]})/
|
||||||
|
|
||||||
function ipinfo(){
|
function ipinfo(){
|
||||||
local api_str="http://ip-api.com/json/$1?fields=query,country,regionName,city,district,zip,isp,org,reverse,mobile,proxy,hosting"
|
local api_str="http://ip-api.com/json/$1?fields=query,country,regionName,city,district,zip,isp,org,reverse,mobile,proxy,hosting"
|
||||||
if ! hash python; then
|
if ! hash python; then
|
||||||
@@ -64,4 +65,4 @@ fi
|
|||||||
# -t: Sort by time. Display the newest first
|
# -t: Sort by time. Display the newest first
|
||||||
# alias ls=ls -At
|
# alias ls=ls -At
|
||||||
|
|
||||||
source $HOME/.vim-config/bash_tools/fzf_file_seletor.sh
|
source $DOT_FILE_DIR/bash_tools/fzf_file_seletor.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user