From bdce3faed65a043de28aba0271eb9a329ab64747 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 13 May 2022 15:06:45 -0300 Subject: etc/bash/rc: Include `f ...` and `v ...` in shell history --- etc/bash/rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/bash') diff --git a/etc/bash/rc b/etc/bash/rc index cb86b94..08ed9f0 100644 --- a/etc/bash/rc +++ b/etc/bash/rc @@ -171,7 +171,7 @@ f() { file="$(git ls-files | grep ${2:-.} | fzf --select-1 --exit-0 --preview 'cat {}')" if [ -n "$file" ]; then # shellcheck disable=2068 - # history -s f $@ + history -s f "$@" history -s "$1" "$file" "$1" "$file" fi @@ -195,6 +195,7 @@ $XDG_CONFIG_HOME/guix/channels.scm v() { f="$(echo "$V_FILES" | fzf --select-1 --exit-0 --query "$1")" if [ -n "$f" ]; then + history -s v "$@" history -s vi "$f" sh -c "vi $f" # vi "$HOME/${f#'~/'}" -- cgit v1.2.3