1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Files
wmaker/util/wpaste
kojima dd9e7d6816 fallback wmaker.inst.in
added wcopy/wpaste scripts
2001-09-04 20:03:58 +00:00

37 lines
691 B
Bash
Executable File

#!/bin/sh
#
# Provide some enhancements to the wxpaste command, which pastes from X11
# clipboard text buffers to standard output.
#
# Allow pasting to stdout from any of the cutbuffers. Note that they are
# indexed counting from 0.
#
# Author: Luke Kendall
#
if [ $# = 0 ]
then
wxpaste $WXPASTE_DEFS
else
MYNAME=`basename $0`
USAGE="usage: $MYNAME [ [0-9]... ] [wxpaste's args]"
for n
do
if expr "x$n" : 'x[0-9][0-9]*$' > /dev/null
then
NUMARGS="$NUMARGS $n"
elif [ "x$n" = "x-h" ]
then
echo "$USAGE" >&2
exit 0
else
WXARGS="$WXARGS $n"
fi
done
set - $NUMARGS
for n
do
wxpaste $WXPASTE_DEFS $WXARGS -cutbuffer $n
done
fi