Skip to content

Commit

Permalink
feat(zsh): add cr command to rerun and copy the last command
Browse files Browse the repository at this point in the history
  • Loading branch information
gibfahn committed May 13, 2020
1 parent d983f0d commit 86955b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dotfiles/.config/gibrc
Expand Up @@ -250,6 +250,9 @@ case $uname in
esac
# Copy last command.
alias clc="fc -ln -1 | sed -e 's/\\\\n/\\n/g' -e 's/\\\\t/\\t/g' | cpy"
# Run last command and copy the command and its output.
# shellcheck disable=SC2155 # `r` won't work if we do `local a` as a separate command.
cr() { local a=$(r 2>&1); cpy <<<"$a"; }

# fda is find all (don't ignore anything).
{ exists fd && alias fda='fd --no-ignore --hidden'; } \
Expand Down

0 comments on commit 86955b9

Please sign in to comment.