diff options
Diffstat (limited to '')
-rw-r--r-- | .config/zsh/alias.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index b4dce00..6e8bfea 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -138,8 +138,12 @@ dgg() { } alias \ srcnt='find . -type f -name "*.c" -exec cat {} \; | sed "/^\//d" | sed "/^\*/d" | sed "/^ \*/d" | sed "/^\/\//d" | sed "/^$/d" | wc -l | tr -d " "' \ - v='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")' \ tohex='printf "0x%x\n"' +v() { + file=$(fzf --preview="head -$FZF_PREVIEW_LINES {}") + [ -z $file ] && return + nvim $file +} ebin() { p=$(pwd) cd "$HOME"/.local/bin || return |