add: fish: start/exit log to custom history
This commit is contained in:
parent
97b1d0e9a8
commit
e99369a634
1 changed files with 9 additions and 0 deletions
|
@ -52,6 +52,15 @@ function save_myhistory --on-event fish_prompt -d "Save custom shell log to $my_
|
||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') $hostname:$fish_pid $PWD [$prev_status] $(history -1)" \
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $hostname:$fish_pid $PWD [$prev_status] $(history -1)" \
|
||||||
>> $my_fish_history
|
>> $my_fish_history
|
||||||
end
|
end
|
||||||
|
# starting sign
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $hostname:$fish_pid [START]" \
|
||||||
|
>> $my_fish_history
|
||||||
|
# exit sign
|
||||||
|
function save_myhistory_exit --on-event fish_exit -d "Add exit sign to $my_fish_history"
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $hostname:$fish_pid [EXIT]" \
|
||||||
|
>> $my_fish_history
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# load local patch
|
# load local patch
|
||||||
source ~/.config/fish/local_patch.fish
|
source ~/.config/fish/local_patch.fish
|
||||||
|
|
Loading…
Reference in a new issue