head 1.4; access; symbols AS_CUI_0_5_0:1.3 AS_AFTER_RESTRUCTURING:1.3; locks; strict; comment @# @; 1.4 date 2002.12.18.11.18.20; author rse; state dead; branches; next 1.3; 1.3 date 2002.10.30.16.20.21; author thl; state Exp; branches; next 1.2; 1.2 date 2002.09.26.18.13.19; author rse; state Exp; branches; next 1.1; 1.1 date 2002.09.25.15.11.02; author rse; state Exp; branches; next ; desc @@ 1.4 log @polish for initial release @ text @## ## AS -- Accounting System ## Copyright (c) 2002 Cable & Wireless Deutschland ## Copyright (c) 2002 Ralf S. Engelschall ## ## This file is part of AS, an accounting system which can be ## found at http://as.is.eu.cw.com/ ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License ## as published by the Free Software Foundation; either version ## 2.0 of the License, or (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ## USA, or contact The OSSP Project . ## ## as.bash: AS Command-Line Wrapper for GNU Bourne Again Shell (BASH) ## as_complete () { # determine current context local arg_pos="$COMP_CWORD" local arg_cur="${COMP_WORDS[COMP_CWORD]}" local arg_prev="${COMP_WORDS[COMP_CWORD-1]}" # initialize reply COMPREPLY=() if [ $arg_pos -eq 2 ]; then # complete account name COMPREPLY=($(./as.pl --complete=account "$arg_cur")) elif [ $arg_pos -eq 1 ]; then # complete time specification COMPREPLY=($(./as.pl --complete=time "$arg_cur")) fi #echo "=${COMPREPLY[0]}=" 1>&2 } complete -F as_complete as alias as="./as.pl" @ 1.3 log @writeevents; do_newevent; splittimespec @ text @@ 1.2 log @- add more documentation - add licenses @ text @d36 1 a36 1 if [ $arg_pos -eq 1 ]; then d39 1 a39 1 elif [ $arg_pos -eq 2 ]; then @ 1.1 log @add first cut for command line client @ text @d2 23 a24 3 ## as.bash -- AS Command-Line Wrapper for GNU Bourne Again Shell (BASH) ## Copyright (c) 2002 Cable & Wireless Germany ## Copyright (c) 2002 Ralf S. Engelschall @