dgy
/
hexagons
Archived
1
0
Fork 0

arreglar el moco de fzf

This commit is contained in:
deadguy 2018-08-13 01:15:43 -03:00
parent 60ded74cd4
commit b0f32f14c4
3 changed files with 4 additions and 20 deletions

View File

@ -135,27 +135,13 @@ fshow() {
FZF-EOF"
}
fc() {
hash=$(git log --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | fzf | awk '{print $1}')
git checkout $hash
}
# }}}
g-c() {
hash=$(git log --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | fzf | awk '{print $1}')
gopen $hash
}
g-log() {
hash=$(git log --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | fzf | awk '{print $1}')
echo $hash && xsel -i $hash
git showtool $hash
}
g-open() {
project=$(git config --local remote.origin.url | sed s/git@github.com\:// | sed s/\.git//)
url="http://github.com/$project/commit/$1"
xdg-open $url
}
# }}}
# tm - tmux session control with fzf {{{
tm() {

View File

@ -10,6 +10,8 @@ export FZF_DEFAULT_OPTS='
export FZF_COMPLETION_OPTS='+c -x'
export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null'
# ag -l -g ""
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}

View File

@ -13,12 +13,8 @@ zle -N down-line-or-beginning-search
bindkey '^P' up-line-or-beginning-search
bindkey '^N' down-line-or-beginning-search
bindkey '^U' history-incremental-pattern-search-backward
bindkey '^F' fzf-history-widget
# Open a file with $EDITOR and fzf
#bindkey '^V' fvim
# Ctrl+Y is a standard in many places, and since Ctrl+R is taken...
# Ctrl+Y is a standard in some places, and since Ctrl+R is taken...
bindkey -a u undo
bindkey -a '^y' redo