Add eth-ip function
This commit is contained in:
parent
ad7a068e78
commit
c5211a17f1
|
@ -312,6 +312,10 @@ urlencode() {
|
||||||
|
|
||||||
#}}}
|
#}}}
|
||||||
|
|
||||||
|
eth-ip() {
|
||||||
|
ip a show primary dev ${1:-/sys/class/net/en*~*/lo(:t)} | awk '/\s*inet / { split($2,a,"/");print a[1] }'
|
||||||
|
}
|
||||||
|
|
||||||
fasel-tunnel() {
|
fasel-tunnel() {
|
||||||
if [[ -z "$1" || -z "$2" || "$1" == "-h" || "$1" == "--help" ]]; then
|
if [[ -z "$1" || -z "$2" || "$1" == "-h" || "$1" == "--help" ]]; then
|
||||||
echo "Usage: fasel-tunnel <host> <port> [remote_port]"
|
echo "Usage: fasel-tunnel <host> <port> [remote_port]"
|
||||||
|
|
|
@ -51,10 +51,10 @@ bindkey -s "^F" "fuck\n"
|
||||||
|
|
||||||
# Finally, make sure the terminal is in application mode, when zle is
|
# Finally, make sure the terminal is in application mode, when zle is
|
||||||
# active. Only then are the values from $terminfo valid.
|
# active. Only then are the values from $terminfo valid.
|
||||||
function zle-line-init () {
|
local function zle-line-init () {
|
||||||
echoti smkx
|
echoti smkx
|
||||||
}
|
}
|
||||||
function zle-line-finish () {
|
local function zle-line-finish () {
|
||||||
echoti rmkx
|
echoti rmkx
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
|
|
Loading…
Reference in a new issue