Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

_chflags



Hi,

Attached is the compdef for *BSD's chflags(1) command, which changes
special file flags.  Please add it if it's okay.

The manpage is available via the web, by the following URL:

	http://www.FreeBSD.org/cgi/man.cgi?query=chflags&apropos=0&sektion=1&manpath=FreeBSD+4.3-RELEASE&format=html

I didn't add rules for the options becase I couldn't be sure if it's
worth supporting.

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Freeze this moment a little bit longer, make each impression
  a little bit stronger..  Experience slips away -- Time stand still"

#compdef chflags

if [[ CURRENT -eq 2 || CURRENT -eq 3 && $words[CURRENT-1] = -* ]]; then
	local flags

	case $OSTYPE in
	  freebsd*)
		flags=(arch opaque nodump sappnd schg sunlnk uappnd uchg uunlnk)
		compadd $flags ${flags/#/no}
	  ;;
	  netbsd*|openbsd*)	  
		flags=(arch opaque nodump sappnd schg uappnd uchg)
		compadd $flags ${flags/#/no}
	  ;;
	esac
else
	_files
fi



Messages sorted by: Reverse Date, Date, Thread, Author