Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (26 sloc)
888 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# `.external` handles all external tools. | |
# | |
# This file is used as a part of `.shell_env` | |
# === Autocomplete === | |
source <(npm completion) # adds normal autocomplete to `npm` commands | |
eval "$(gh completion -s zsh)" # adds autocomplete for `gh` tool | |
# === fzf === | |
# https://github.com/junegunn/fzf | |
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then | |
export PATH="$PATH:/usr/local/opt/fzf/bin" | |
fi | |
# Auto-completion | |
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.zsh" 2> /dev/null | |
# Key bindings | |
source "/usr/local/opt/fzf/shell/key-bindings.zsh" | |
# Setting ag as the default source for fzf | |
export FZF_DEFAULT_COMMAND='ag -g ""' | |
# To apply the command to CTRL-T as well | |
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" | |
_fzf_compgen_path() { | |
ag -g "" "$1" | |
} | |
# === z === | |
# https://github.com/rupa/z | |
source "/usr/local/etc/profile.d/z.sh" |