diff options
author | EuAndreh <eu@euandre.org> | 2022-05-13 15:06:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-13 15:06:45 -0300 |
commit | bdce3faed65a043de28aba0271eb9a329ab64747 (patch) | |
tree | c5efb2f4a6052ee2f79ad3641163799a9a70b5f4 /etc/bash | |
parent | etc/bash/rc: Replace hardcoded ~/.config paths with $XDG_CONFIG_HOME in `v()`... (diff) | |
download | dotfiles-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/rc | 3 |
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#'~/'}" |