Skip to content

Instantly share code, notes, and snippets.

@MarkWalters-dev
Last active December 24, 2020 17:01

Revisions

  1. MarkWalters-dev revised this gist Dec 24, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .bashrc
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,4 @@
    export BASHLOG=$HOME/.local/share/bashlog
    [ -e "$BASHLOG" ] || mkdir -p $BASHLOG
    [ -n "$TERM_SESSION_ID" ] || export TERM_SESSION_ID="$(uuidgen)"
    export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $HOME/.local/share/bashlog/$(printf "%(%F)T\n").log'
    export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $BASHLOG/$(printf "%(%F)T\n").log'
  2. MarkWalters-dev revised this gist Dec 24, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .bashrc
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    [ -n "$TERM_SESSION_ID" ] || export TERM_SESSION_ID="$(uuidgen)"
    export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $HOME/.logs/bash-history-$(printf "%(%F)T\n").log'
    export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $HOME/.local/share/bashlog/$(printf "%(%F)T\n").log'
  3. MarkWalters-dev created this gist Dec 24, 2020.
    2 changes: 2 additions & 0 deletions .bashrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    [ -n "$TERM_SESSION_ID" ] || export TERM_SESSION_ID="$(uuidgen)"
    export PROMPT_COMMAND='echo "$(printf "%(%F.%H:%M:%S)T\n") $TERM_SESSION_ID $PWD $(history 1)" >> $HOME/.logs/bash-history-$(printf "%(%F)T\n").log'