Skip to content

Commit d4f8f08

Browse files
author
Torstein Krause Johansen
committed
Becoming heavy user of ag through fzf
1 parent dd649d1 commit d4f8f08

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

ag/.agignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
*.class
12
*.min.js
3+
.cargo
4+
.local/lib
5+
.steam
6+
.wine
7+
TAGS
28
jquery*.js
39
src/test
410
target
5-
TAGS
11+
virtual

bash/.fzf.bash

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Setup fzf
2+
# ---------
3+
if [[ ! "$PATH" == */usr/local/src/fzf/bin* ]]; then
4+
export PATH="$PATH:/usr/local/src/fzf/bin"
5+
fi
6+
7+
# Auto-completion
8+
# ---------------
9+
[[ $- == *i* ]] && source "/usr/local/src/fzf/shell/completion.bash" 2> /dev/null
10+
11+
# Key bindings
12+
# ------------
13+
source "/usr/local/src/fzf/shell/key-bindings.bash"
14+
15+
# Setting ag as the default source for fzf
16+
# and include hidden files
17+
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
18+
19+
# To apply the command to CTRL-T as well
20+
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
21+
22+

0 commit comments

Comments
 (0)