Merge branch 'main' of github.com:qwjyh/dotfiles
This commit is contained in:
commit
3a84d08c36
1 changed files with 11 additions and 2 deletions
|
@ -16,9 +16,18 @@ if status is-interactive
|
||||||
set -x SHELL bash
|
set -x SHELL bash
|
||||||
|
|
||||||
# opam
|
# opam
|
||||||
# source ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
source ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# key bindings
|
# key bindings
|
||||||
bind \b backward-kill-word
|
bind \b backward-kill-word
|
||||||
|
|
||||||
|
# save fish log to my custom file
|
||||||
|
set -gx my_fish_history "$HOME/my_fish_history.txt"
|
||||||
|
function save_myhistory --on-event fish_prompt -d "Save custom shell log to $my_fish_history"
|
||||||
|
set -l prev_status $status
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $hostname:$fish_pid $PWD [$prev_status] $(history -1)" \
|
||||||
|
>> $my_fish_history
|
||||||
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue