diff options
Diffstat (limited to '.config')
| -rw-r--r-- | .config/zsh/.zshrc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 9b92422..65c10c8 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -378,6 +378,16 @@ alias trash_restore='gio trash --restore "$(gio trash --list | fzf | cut -f 1)"' alias ec='$EDITOR $HOME/.config/zsh/.zshrc' alias sc="source $HOME/.config/zsh/.zshrc" +# Print previous command into a file +getlast () { + fc -nl $((HISTCMD - 1)) +} + +alias pp='getlast 2>&1 |&tee -a output.txt' + +# Print output of a command NOTE: Must be used in conjunction but no need for "|" symbol +alias -g cap='2>&1 | tee -a output.txt' + # confirmation # alias mv='mv -i' alias cp='cp -i' |
