#! /bin/csh
# XKIBLS.CSH -- send a list files command to another window
#
# Eric Mandel

set noglob
# get parameters
set window	= `pquery xkibls window $*`

set files	= `pquery xkibls files $*`
set long	= `pquery xkibls long $*`
set all		= `pquery xkibls all $*`
set type	= `pquery xkibls type $*`
set reverse	= `pquery xkibls reverse $*`
set sort	= `pquery xkibls sort $*`

set switches = "-"
if( "$long" == "yes" ) set switches = ${switches}l
if( "$all" == "yes" ) set switches = ${switches}a
if( "$type" == "yes" ) set switches = ${switches}F
if( "$reverse" == "yes" ) set switches = ${switches}r
if( "$sort" == "time" ) set switches = ${switches}t
if( "${switches}" == "-" ) set switches = ""

unset noglob

xkib -name ${window} -c "ls ${switches} ${files}"

