7 .Nd Interactively select a file to open
22 takes a list of filenames and directories on the command-line
23 and displays them in a menu for the user to select one.
24 If the user selects a directory
27 the directory contents are displayed as a fresh menu.
28 Once the user has selected a filename,
29 its absolute path is printed to standard output.
34 as its user-interface,
35 so see that page for more details.
41 before the list of items.
42 This is passed straight through to
48 is provided with a single filename or directory argument,
49 it will automatically select it
50 (printing the filename to standard output,
51 or presenting a new menu with the contents of the directory).
56 will always present the arguments it's given,
57 even if there's only one.
59 If this token is encountered before the first non-option argument,
60 all following arguments will be treated as menu-items,
61 even if they would otherwise be valid command-line options.
63 If encountered after the first non-option argument,
64 or after a previous instance of
66 it is treated as a menu-item.
68 File and directory names to be presented to the user.
69 If a name does not exist on the filesystem
70 and the user selects it,
71 it is treated as a file.
75 prints a usage summary and exits,
76 ignoring any other flag and arguments.
86 prints nothing and sets its exit status to 1
87 if the user refused to select a file.
90 .Bd -literal -offset indent
91 CHOICE=$(vis-open -p "Select a file to stat")
93 echo "No selection was made, or an error occurred"
108 to obtain the contents of a directory,
109 weird things might happen if you have control-characters in your filenames.