Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint-fix
args: ["--ignore", "LICENSE.md", "--disable", "~MD013"]

- repo: https://github.com/thlorenz/doctoc
rev: v2.2.0
hooks:
- id: doctoc
args: ["--update-only"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [Customization](#customization)
- [A note on `lessfilter-fzf`](#a-note-on-lessfilter-fzf)
- [Other FZF resources](#other-fzf-resources)
- [Contributors](#contributors)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -128,3 +129,11 @@ Ultimately, `lesspipe.sh` (if present) will still honor your own `lessfilter` if
- [So you've installed `fzf`. Now what?](https://andrew-quinn.me/fzf/) - Good blog post by Andrew Quinn with more tricks you can do with `fzf`.
- [fzf-pass](https://github.com/smeagol74/zsh-fzf-pass) - ZSH plugin that uses [fzf](https://github.com/junegunn/fzf) and [pass](https://www.passwordstore.org/) for better password handling.
- [fzf-tab](https://github.com/Aloxaf/fzf-tab) - Replace ZSH's default completion with [fzf](https://github.com/junegunn/fzf).

## Contributors

<a href="https://github.com/unixorn/fzf-zsh-plugin/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=unixorn/fzf-zsh-plugin" />
</a>

Made with [contributors-img](https://contributors-img.web.app).
6 changes: 3 additions & 3 deletions bin/apt-fzf-search
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if has apt-cache; then
fzf --multi --cycle --reverse --preview 'apt-cache show {1}' | \
xargs -r sudo apt install -y
else
fail "Cannot find apt in $PATH.
fail "Cannot find apt in $PATH.

Are you sure you're on a Debian or Ubuntu system?"
fi
fi
2 changes: 1 addition & 1 deletion bin/asdf-fzf-install
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ if has asdf; then
asdf-install "$@"
else
fail "Can't find asdf in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/asdf-fzf-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ if has asdf; then
asdf-remove "$@"
else
fail "Can't find asdf in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/chrome-bookmark-browser
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ if ! has jq; then
fail "$myname requires jq and can't find it in $PATH"
fi

b "$@"
b "$@"
10 changes: 5 additions & 5 deletions bin/chrome-history
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# browse Chrome history, then open
# browse Chrome history, then open

set -o pipefail
if [[ -n "$DEBUG" ]]; then
Expand All @@ -26,16 +26,16 @@ function has() {
function cleanup() {
if [[ -d "$SCRATCH_D" ]]; then
rm -fr "$SCRATCH_D"
fi
}
fi
}

# Set up a working scratch directory
SCRATCH_D=$(mktemp -d)

if [[ ! "$SCRATCH_D" || ! -d "$SCRATCH_D" ]]; then
echo "Could not create temp dir"
exit 1
fi
fi

trap cleanup EXIT

Expand Down Expand Up @@ -65,4 +65,4 @@ if [[ -r "$chrome_history" ]]; then
chrome-history "$@"
else
fail "Can't read $chrome_history"
fi
fi
2 changes: 1 addition & 1 deletion bin/d-rm
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ if has docker; then
drm "$@"
else
"Cannot find docker in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/d-stop-container
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ if has docker; then
d-stop-container "$@"
else
"Cannot find docker in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/fzf-brew-cask-install
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ fzf-brew-cask-install() {
fi
}
# shellcheck disable=SC2068
fzf-brew-install $@
fzf-brew-install $@
2 changes: 1 addition & 1 deletion bin/fzf-brew-cask-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ fzf-brew-cask-uninstall() {
}

# shellcheck disable=SC2068
fzf-brew-cask-uninstall $@
fzf-brew-cask-uninstall $@
2 changes: 1 addition & 1 deletion bin/fzf-brew-install
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ function fzf-brew-install(){
}

# shellcheck disable=SC2068
fzf-brew-install $@
fzf-brew-install $@
2 changes: 1 addition & 1 deletion bin/fzf-brew-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ fzf-brew-uninstall() {
}

# shellcheck disable=SC2068
fzf-brew-uninstall $@
fzf-brew-uninstall $@
2 changes: 1 addition & 1 deletion bin/fzf-brew-update
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ brew-update-plugin() {
}

# shellcheck disable=SC2068
brew-update-plugin $@
brew-update-plugin $@
4 changes: 3 additions & 1 deletion bin/fzf-browse-pods
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function usage() {
echo "Use fzf to browse running k8s pods"
}

# shellcheck disable=SC2120,SC2016
pods() {
: | command='kubectl get pods --all-namespaces' fzf \
--info=inline --layout=reverse --header-lines=1 \
Expand All @@ -73,4 +74,5 @@ pods() {
}

check-dependencies
pods
# shellcheck disable=SC2119
pods
2 changes: 1 addition & 1 deletion bin/fzf-find-edit
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ else
fi

# shellcheck disable=SC2068
fzf-find-edit $@
fzf-find-edit $@
2 changes: 1 addition & 1 deletion bin/fzf-git-branch
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ function fzf-git-branch(){
}

# shellcheck disable=SC2068
fzf-git-branch $@
fzf-git-branch $@
2 changes: 1 addition & 1 deletion bin/fzf-grep-edit
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ else
}
fi
# shellcheck disable=SC2068
fzf-grep-edit $@
fzf-grep-edit $@
2 changes: 1 addition & 1 deletion bin/fzf-kill
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ fzf-kill() {
}

# shellcheck disable=SC2068
fzf-kill $@
fzf-kill $@
2 changes: 1 addition & 1 deletion bin/fzf-vscode
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ done < <(
)
if [ -n "${ARGLIST}" ]; then
code ${NEW_WINDOW} ${ARGLIST}
fi
fi
2 changes: 1 addition & 1 deletion bin/tm
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ if has tmux; then
tm "$@"
else
fail "Can't find tmux in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/tmux-kill
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ if has tmux; then
tmuxkillf "$@"
else
fail "Can't find tmux in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/tmux-search
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ if has tmux; then
tm-search "$@"
else
fail "Can't find tmux in $PATH"
fi
fi
2 changes: 1 addition & 1 deletion bin/vagrant-box-search
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ if [[ ! -r "$machine_index" ]]; then
fail "Can't read $machine_index"
fi

vagrant-search "$@"
vagrant-search "$@"
2 changes: 1 addition & 1 deletion completions/_fzf
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ _arguments \
'--no-clear[Do not clear finder interface on exit.]' \
'--sync[Synchronous search for multi-staged filtering.]' \
'--version[Display version information and exit.]' \
'-2[.]'
'-2[.]'
1 change: 0 additions & 1 deletion fzf-settings.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ fi
# Key bindings
# ------------
source "${FZF_PATH}/shell/key-bindings.zsh"

Loading