zsh:g{log,stash}: Drop tput for stty for size
As stty is part of POSIX and thus better available.
This commit is contained in:
@@ -108,7 +108,9 @@ local -a fzf_args=(
|
||||
# 0.45 seems to be round about the ratio between cols and lines on my system.
|
||||
# With that I get somewhat decent results with. This probably depends on the
|
||||
# font and font-size of the terminal and needs to be changed potentially.
|
||||
if (( $(tput cols) * 0.4 > $(tput lines) )); then
|
||||
local -a tty_size
|
||||
tty_size=(${=$(command stty size 2>/dev/null)})
|
||||
if (( ! $? )) && (( $tty_size[2] * 0.4 > $tty_size[1] )); then
|
||||
fzf_args+=(--preview-window=right)
|
||||
else
|
||||
fzf_args+=(--preview-window=down)
|
||||
|
||||
Reference in New Issue
Block a user