Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions ocenv
Original file line number Diff line number Diff line change
Expand Up @@ -630,16 +630,25 @@ then
else
alias psg='ps aux | grep -v grep | grep --color=auto'
fi
if [[ -x "$(command which less 2>/dev/null)" ]]
if [[ -x "$(command which bat 2>/dev/null)" ]]
then
export GV_PAGER=bat
elif [[ -x "$(command which less 2>/dev/null)" ]]
then
export GV_PAGER=less
else
export GV_PAGER=more
fi
alias via='${GV_PAGER} ${GV_INSTANCE_ALERT_LOG}'
alias vio='${EDITOR} /etc/oratab'
alias taa='tail -n50 -f ${GV_INSTANCE_ALERT_LOG}'
alias tad='tail -n50 -f ${GV_INSTANCE_DRC_LOG}'
if [[ "${GV_PAGER}" == "bat" ]]
then
alias taa='tail -n50 -f ${GV_INSTANCE_ALERT_LOG} | bat --paging=never -l log'
alias tad='tail -n50 -f ${GV_INSTANCE_DRC_LOG} | bat --paging=never -l log'
else
alias taa='tail -n50 -f ${GV_INSTANCE_ALERT_LOG}'
alias tad='tail -n50 -f ${GV_INSTANCE_DRC_LOG}'
fi
alias u=list_env
unalias sql 2>/dev/null

Expand Down Expand Up @@ -1988,7 +1997,12 @@ talsnr(){
local LV_LSNR_LOG
if LV_LSNR_LOG=$(get_lsnr_tracefile "$1")
then
tail -n50 -f "${LV_LSNR_LOG}"
if [[ "${GV_PAGER}" == "bat" ]]
then
tail -n50 -f "${LV_LSNR_LOG}" | bat --paging=never -l log
else
tail -n50 -f "${LV_LSNR_LOG}"
fi
fi
}
vilsnr(){
Expand Down
Loading