aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-05-06 21:29:52 -0400
committertdro <tdro@users.noreply.github.com>2021-05-06 21:29:52 -0400
commit6ee02d283831a16714e3e127cafbeb54cb143a16 (patch)
tree9bf181cc1ccd272e5723c1a542cf7f40815c2294 /.config
parentd2a5b3bebbb900d39c57b806f5e2e956552eb93b (diff)
downloaddotfiles-6ee02d283831a16714e3e127cafbeb54cb143a16.tar.gz
dotfiles-6ee02d283831a16714e3e127cafbeb54cb143a16.tar.bz2
dotfiles-6ee02d283831a16714e3e127cafbeb54cb143a16.zip
.config/fzf-marks/fzf-marks.plugin.bash -> .config/fzf/marks.plugin.bash
Move directory and file marks to central location.
Diffstat (limited to '.config')
-rw-r--r--.config/fzf/marks.plugin.bash (renamed from .config/fzf-marks/fzf-marks.plugin.bash)13
1 files changed, 4 insertions, 9 deletions
diff --git a/.config/fzf-marks/fzf-marks.plugin.bash b/.config/fzf/marks.plugin.bash
index 9c80f94..f6eb82f 100644
--- a/.config/fzf-marks/fzf-marks.plugin.bash
+++ b/.config/fzf/marks.plugin.bash
@@ -1,3 +1,5 @@
+#!/bin/bash
+
# MIT License
# Copyright (c) 2018 Urbain Vaes
@@ -25,18 +27,11 @@ FZF_MARKS_FILE=$FZF_DIRECTORY_MARKS
command -v fzf >/dev/null 2>&1 || return
-function is_interactive_shell() {
- # https://www.gnu.org/software/bash/manual/html_node/Is-this-Shell-Interactive_003f.html
+is_interactive_shell() { # https://www.gnu.org/software/bash/manual/html_node/Is-this-Shell-Interactive_003f.html
[[ "$-" =~ "i" ]]
}
-if [[ -z "${FZF_MARKS_FILE}" ]] ; then
- FZF_MARKS_FILE="${HOME}/.fzf-marks"
-fi
-
-if [[ ! -f "${FZF_MARKS_FILE}" ]]; then
- touch "${FZF_MARKS_FILE}"
-fi
+[ ! -f "${FZF_MARKS_FILE}" ] && mkdir -p "$(dirname "${FZF_MARKS_FILE}")" && touch "${FZF_MARKS_FILE}"
if [[ -z "${FZF_MARKS_COMMAND}" ]] ; then