zsh: fzf convenience
This commit is contained in:
parent
7474dd2dc1
commit
4711825c4e
2 changed files with 12 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
export EDITOR='nvim'
|
export EDITOR='nvim'
|
||||||
export VISUAL=$EDITOR
|
export VISUAL=$EDITOR
|
||||||
|
|
||||||
|
|
@ -17,3 +19,5 @@ fi
|
||||||
export LOCAL_SESSION
|
export LOCAL_SESSION
|
||||||
|
|
||||||
export SHELL=$(which zsh)
|
export SHELL=$(which zsh)
|
||||||
|
|
||||||
|
export FZF_DEFAULT_COMMAND='fd'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
alias startx='ssh-agent startx; vlock'
|
alias startx='ssh-agent startx; vlock'
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
|
|
@ -27,3 +29,9 @@ docker-ip() {
|
||||||
alias shrug='echo -n "¯\\_(ツ)_/¯"'
|
alias shrug='echo -n "¯\\_(ツ)_/¯"'
|
||||||
|
|
||||||
alias today='nvim $HOME/notes/$(date "+%F").md'
|
alias today='nvim $HOME/notes/$(date "+%F").md'
|
||||||
|
|
||||||
|
fe() {
|
||||||
|
local files
|
||||||
|
IFS=$'\n' files=($(fzf --query="$1" --multi --select-1 --exit-0))
|
||||||
|
[[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue