zsh: test file before editing in whed()
This commit is contained in:
parent
c41f0cb731
commit
8b36173188
2 changed files with 4 additions and 1 deletions
|
@ -82,3 +82,7 @@ function togglefg () {
|
||||||
zle accept-line -w
|
zle accept-line -w
|
||||||
}
|
}
|
||||||
zle -N togglefg
|
zle -N togglefg
|
||||||
|
|
||||||
|
function whed() {
|
||||||
|
[ -e "$1" ] && $EDITOR $(which "$1")
|
||||||
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ alias \
|
||||||
# Quasi functions
|
# Quasi functions
|
||||||
alias \
|
alias \
|
||||||
xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \
|
xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \
|
||||||
whed='() { $EDITOR $(which "$1") }' \
|
|
||||||
xpick="xprop | awk '
|
xpick="xprop | awk '
|
||||||
/^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print}
|
/^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print}
|
||||||
/^WM_NAME/{sub(/.* =/, \"title:\"); print}'"
|
/^WM_NAME/{sub(/.* =/, \"title:\"); print}'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue