Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VIS-OPEN(1)		    General Commands Manual		   VIS-OPEN(1)

NAME
       vis-open	-- Interactively select	a file to open

SYNOPSIS
       vis-open	[-p prompt] [-f] [--] [files]

       vis-open	-h

DESCRIPTION
       vis-open	 takes a list of filenames and directories on the command-line
       and displays them in a menu for the user	to select one.	 If  the  user
       selects	a  directory  (including  ..), the directory contents are dis-
       played as a fresh menu.	Once the user has selected a filename, its ab-
       solute path is printed to standard output.

       vis-open	uses vis-menu(1) as its	user-interface,	so see that  page  for
       more details.

       -p prompt
	     Display prompt before the list of items.  This is passed straight
	     through to	vis-menu(1).

       -f    Normally,	if  vis-open is	provided with a	single filename	or di-
	     rectory argument, it will automatically select it	(printing  the
	     filename  to  standard  output, or	presenting a new menu with the
	     contents of the directory).  If -f	is provided, vis-open will al-
	     ways present the arguments	it's given, even if there's only one.

       --    If	this token is encountered before the  first  non-option	 argu-
	     ment, all following arguments will	be treated as menu-items, even
	     if	they would otherwise be	valid command-line options.

	     If	 encountered  after  the first non-option argument, or after a
	     previous instance of -- it	is treated as a	menu-item.

       files
	     File and directory	names to be presented to the user.  If a  name
	     does  not	exist on the filesystem	and the	user selects it, it is
	     treated as	a file.

       -h    If	present, vis-open prints a usage summary and  exits,  ignoring
	     any other flag and	arguments.

EXIT STATUS
       The vis-open utility exits 0 on success,	and >0 if an error occurs.

       In  particular,	like vis-menu(1), vis-open prints nothing and sets its
       exit status to 1	if the user refused to select a	file.

EXAMPLES
	     CHOICE=$(vis-open -p "Select a file to stat")
	     if	[ $? -gt 0 ]; then
		     echo "No selection	was made, or an	error occurred"
	     else
		     stat "$CHOICE"
	     fi

SEE ALSO
       vis(1), vis-menu(1)

BUGS
       Because vis-open	uses ls(1) to obtain  the  contents  of	 a  directory,
       weird  things might happen if you have control-characters in your file-
       names.

Vis 0.9			       November	29, 2016		   VIS-OPEN(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=vis-open&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help