Skip to content

Commit

Permalink
peco history not uniq
Browse files Browse the repository at this point in the history
  • Loading branch information
umeyuki committed Jul 9, 2014
1 parent aee53fc commit 823e9f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ shopt -s cdspell
eval "$(direnv hook bash)"

peco_history() {
declare l=$(HISTTIMEFORMAT= history | awk '{print $2}' | sort -u | peco --query "$READLINE_LINE")
declare l=$(HISTTIMEFORMAT= history | history | awk '{for(i=2;i<NF;i++){printf("%s%s",$i,OFS=" ")}print $NF}' | peco --query "$READLINE_LINE")
READLINE_LINE="$l"
READLINE_POINT=${#l}
}
Expand Down

0 comments on commit 823e9f3

Please sign in to comment.