aboutsummaryrefslogtreecommitdiff
path: root/etc/bash
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-13 15:06:45 -0300
committerEuAndreh <eu@euandre.org>2022-05-13 15:06:45 -0300
commitbdce3faed65a043de28aba0271eb9a329ab64747 (patch)
treec5efb2f4a6052ee2f79ad3641163799a9a70b5f4 /etc/bash
parentetc/bash/rc: Replace hardcoded ~/.config paths with $XDG_CONFIG_HOME in `v()`... (diff)
downloaddotfiles-bdce3faed65a043de28aba0271eb9a329ab64747.tar.gz
dotfiles-bdce3faed65a043de28aba0271eb9a329ab64747.tar.xz
etc/bash/rc: Include `f ...` and `v ...` in shell history
Diffstat (limited to 'etc/bash')
-rw-r--r--etc/bash/rc3
1 files changed, 2 insertions, 1 deletions
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#'~/'}"