Skip to content

Commit

Permalink
Fix: fzfhist plugin listing timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Sep 20, 2024
1 parent dac47c4 commit ab5d66d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions plugins/fzfhist.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Command history plugin via FZF for CliFM
# Dependencies: fzf
# Commands history plugin for Clifm
# Dependencies: fzf, tac, sed

# Written by L. Abramovich
# License GPL3
Expand All @@ -18,7 +18,7 @@ if ! type fzf > /dev/null 2>&1; then
exit 127
fi

FILE="${XDG_CONFIG_HOME:=$HOME/.config}/clifm/profiles/$CLIFM_PROFILE/history.clifm"
HIST_FILE="${XDG_CONFIG_HOME:=$HOME/.config}/clifm/profiles/$CLIFM_PROFILE/history.clifm"

# Source our plugins helper
if [ -z "$CLIFM_PLUGINS_HELPER" ] || ! [ -f "$CLIFM_PLUGINS_HELPER" ]; then
Expand All @@ -29,11 +29,10 @@ fi
. "$CLIFM_PLUGINS_HELPER"

# shellcheck disable=SC2154
fzf --prompt="$fzf_prompt" \
sed '/^#/d' "$HIST_FILE" | tac | fzf --prompt="$fzf_prompt" \
--reverse --height 15 --info=inline \
--bind "tab:accept" --header "Run a command from history" \
--color="$(get_fzf_colors)" \
< "$FILE" > "$CLIFM_BUS"
--color="$(get_fzf_colors)" > "$CLIFM_BUS"
printf "\n"

exit 0
2 changes: 1 addition & 1 deletion plugins/plugins-helper
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ fzf_borders()

# A few fixed values to construct the FZF interface
fzf_height="${CLIFM_FZF_HEIGHT:-80}%"
fzf_prompt="CliFM > "
fzf_prompt="Clifm > "
colorize=1
[ -n "$CLIFM_COLORLESS" ] && colorize=0

0 comments on commit ab5d66d

Please sign in to comment.