File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ TAVATAR_LOG=~ /.tavatar_history
2
+
3
+ BASH_LOG=~ /demos.out
4
+ bash_log_commands () {
5
+ # https://superuser.com/questions/175799
6
+ [ -n " $COMP_LINE " ] && return # do nothing if completing
7
+ # don't cause a preexec for $PROMPT_COMMAND
8
+ [[ " $PROMPT_COMMAND " =~ " $BASH_COMMAND " ]] && return
9
+ local this_command=` HISTTIMEFORMAT= history 1 | sed -e " s/^[ ]*[0-9]*[ ]*//" ` ;
10
+ echo " $this_command " >> " $TAVATAR_LOG "
11
+ }
12
+ trap ' bash_log_commands' DEBUG
Original file line number Diff line number Diff line change
1
+ TAVATAR_LOG=~ /.tavatar_history
2
+
3
+ function cmd_log --on-event fish_preexec ; echo " $argv " >> " $TAVATAR_LOG " ; end
Original file line number Diff line number Diff line change
1
+ TAVATAR_LOG=~ /.tavatar_history
2
+
3
+ preexec () { echo $1 >> " $TAVATAR_LOG " ; }
You can’t perform that action at this time.
0 commit comments