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() {
|
||||
if [[ -z "$1" || -z "$2" || "$1" == "-h" || "$1" == "--help" ]]; then
|
||||
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
|
||||
# active. Only then are the values from $terminfo valid.
|
||||
function zle-line-init () {
|
||||
local function zle-line-init () {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish () {
|
||||
local function zle-line-finish () {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
|
|
Loading…
Reference in a new issue