Removed mac code

This commit is contained in:
Bruce Hill 2020-04-07 00:12:35 -07:00
parent e87a38433e
commit 887349c102

12
trash
View File

@ -53,10 +53,8 @@ EOU
}
pick_trashfiles() {
td="$1"
shift
prompt="$1"
shift
td="$1"; shift
prompt="$1"; shift
find "$td"/info -mindepth 1 -maxdepth 1 -print0 | \
fzf -1 --read0 --prompt="$prompt" --query="$@" --multi \
--preview="sh -c 'f=\"$td/files/\${1%.trashinfo}\"; [ -d \"\$f\" ] && tree \"\$f\" || echo \"\$f\" && cat \"\$f\"' -- {}"
@ -71,11 +69,7 @@ confirm() {
tput civis >/dev/tty;
printf '\033[1m%s\033[0m' "$2" >/dev/tty;
stty -icanon -echo >/dev/tty 2>/dev/tty;
if [ "$(uname)" = "Darwin" ]; then
read -n 1 REPLY </dev/tty >/dev/tty;
else
REPLY="$(dd bs=1 count=1 2>/dev/null </dev/tty)"
fi
REPLY="$(dd bs=1 count=1 2>/dev/null </dev/tty)"
stty icanon echo >/dev/tty 2>/dev/tty
tput cvvis >/dev/tty
[ "$REPLY" = "y" ]