xref: /freebsd/contrib/dialog/samples/fselect1 (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1#!/bin/sh
2# $Id: fselect1,v 1.12 2020/11/26 00:09:12 tom Exp $
3
4. ./setup-vars
5
6FILE=$HOME
7for n in .cshrc .profile .bashrc
8do
9	if test -f "$HOME/$n" ; then
10		FILE=$HOME/$n
11		break
12	fi
13done
14
15exec 3>&1
16returntext=`$DIALOG --title "Please choose a file" "$@" --fselect "$FILE" 14 48 2>&1 1>&3`
17returncode=$?
18exec 3>&-
19
20. ./report-string
21