Commit 300ffcaf authored by Petra Malik's avatar Petra Malik Committed by Francois Marier

Imported Debian patch 1.35-3

parent 984cbd52
This diff is collapsed.
This diff is collapsed.
......@@ -32,15 +32,15 @@ function _cdargs_get_dir ()
# if there is one exact match (possibly with extra path info after it),
# then just use that match without calling cdargs
if [ -e "$HOME/.cdargs" ]; then
dir=`grep "^$1 " "$HOME/.cdargs"`
dir=`/bin/grep "^$1 " "$HOME/.cdargs"`
if [ -z "$dir" ]; then
bookmark="${1/\/*/}"
if [ "$bookmark" != "$1" ]; then
dir=`grep "^$bookmark " "$HOME/.cdargs"`
extrapath=`echo "$1" | sed 's#^[^/]*/#/#'`
dir=`/bin/grep "^$bookmark " "$HOME/.cdargs"`
extrapath=`echo "$1" | /bin/sed 's#^[^/]*/#/#'`
fi
fi
[ -n "$dir" ] && dir=`echo "$dir" | sed 's/^[^ ]* //'`
[ -n "$dir" ] && dir=`echo "$dir" | /bin/sed 's/^[^ ]* //'`
fi
if [ -z "$dir" -o "$dir" != "${dir/
/}" ]; then
......@@ -49,7 +49,7 @@ function _cdargs_get_dir ()
dir=
if cdargs --noresolve "${1/\/*/}"; then
dir=`cat "$HOME/.cdargsresult"`
rm -f "$HOME/.cdargsresult";
/bin/rm -f "$HOME/.cdargsresult";
fi
fi
if [ -z "$dir" ]; then
......@@ -167,9 +167,9 @@ function mark ()
# first clear any bookmarks with this same alias, if file exists
if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then
tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"`
tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | /bin/sed -e "s/\\/$//"`
tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM
grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs";
/bin/grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs";
fi
# add the alias to the list of bookmarks
cdargs --add=":$1:`pwd`";
......@@ -218,7 +218,7 @@ function _cdargs_aliases ()
cur=${COMP_WORDS[COMP_CWORD]}
if [ "$cur" != "${cur/\//}" ]; then # if at least one /
bookmark="${cur/\/*/}"
dir=`grep "^$bookmark " "$HOME/.cdargs" | sed 's#^[^ ]* ##'`
dir=`/bin/grep "^$bookmark " "$HOME/.cdargs" | /bin/sed 's#^[^ ]* ##'`
if [ -n "$dir" -a "$dir" = "${dir/
/}" -a -d "$dir" ]; then
strip="${dir//?/.}"
......@@ -226,8 +226,8 @@ function _cdargs_aliases ()
IFS='
'
COMPREPLY=( $(
compgen -d "$dir`echo "$cur" | sed 's#^[^/]*##'`" \
| sed -e "s/^$strip/$bookmark/" -e "s/\([^\/a-zA-Z0-9#%_+\\\\,.-]\)/\\\\\\1/g" ) )
compgen -d "$dir`echo "$cur" | /bin/sed 's#^[^/]*##'`" \
| /bin/sed -e "s/^$strip/$bookmark/" -e "s/\([^\/a-zA-Z0-9#%_+\\\\,.-]\)/\\\\\\1/g" ) )
IFS="$oldIFS"
fi
else
......
cdargs for Debian
-----------------
If you use bash
===============
simply copy the file examples/cdargs-bash.sh somewhere into your $PATH
and put a line like source cdargs-bash.sh in your ~/.bashrc.
If you use tcsh
===============
copy the file examples/cdargs-tcsh.csh to a place that you like and
source it from your ~/.cshrc (or ~/.tcsh ?). Any help appreciated in
making the tcsh expansion more powerful.
cdargs in emacs/xemacs
======================
Add the line
(load-library "cdargs")
to your .emacs-File.
WRAPPING
========
If you do not like the cursor wrapping around on the top and the
bottom of the list, start cdargs with the additional option --nowrap:
Example:
function cb () { cdargs --nowrap "$1" && cd `cat $HOME/.cdargsresult` ; }
This works for a bash-like shell, but I think this is rather easy to
port...
MORE HELP
=========
For more information try:
$ configure --help
$ cdargs --help
or press 'H' or '?' while running cdargs.
Additionally, cdargs comes with a manpage.
#!/bin/sh -eu
FLAVOR="$1"
echo "install/cdargs: Handling install of emacsen flavor $FLAVOR"
byte_compile_options="-batch -f batch-byte-compile"
el_file="cdargs.el"
el_dir="/usr/share/emacs/site-lisp"
elc_dir="/usr/share/$FLAVOR/site-lisp"
if [ "$FLAVOR" != emacs ]
then
echo "install/cdargs: byte-compiling for $FLAVOR"
# Copy the temp .el files
trap "rm -f \"$elc_dir/$el_file\"" 0
cp "$el_dir/$el_file" "$elc_dir/$el_file"
# Byte compile them
"$FLAVOR" $byte_compile_options "$elc_dir/$el_file" > /dev/null 2>&1
rm -f "$elc_dir/$el_file"
trap "" 0
fi
exit 0
#!/bin/sh -eu
FLAVOR="$1"
echo "remove/cdargs: Handling removal of emacsen flavor $FLAVOR"
if [ "$FLAVOR" != emacs ]
then
echo "remove/cdargs: purging byte-compiled files for ${FLAVOR}"
rm -f "/usr/share/$FLAVOR/site-lisp/cdargs.elc"
fi
exit 0
cdargs (1.35-3) unstable; urgency=low
* Provide paths for commands in the example script (Closes: #337548)
-- Petra Malik <petra@debian.org> Mon, 17 Apr 2006 21:21:38 +1200
cdargs (1.35-2) unstable; urgency=low
* Upgrade to debhelper compatibility level 5
-- Petra Malik <petra@debian.org> Sat, 8 Apr 2006 06:06:23 +1200
cdargs (1.35-1) unstable; urgency=low
* New upstream release
-- Petra Malik <petra@debian.org> Sat, 1 Apr 2006 21:59:09 +1200
cdargs (1.32-1) unstable; urgency=low
* update the copyright file to use the new FSF address
* Update to the latest version of debian policy (standards-version 3.6.2).
* New upstream release
-- Petra Malik <petra@debian.org> Wed, 2 Nov 2005 21:14:41 +1300
cdargs (1.31-1) unstable; urgency=low
* New upstream release
-- Petra Malik <petra@debian.org> Mon, 28 Feb 2005 16:37:38 +1300
cdargs (1.29-1) unstable; urgency=low
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Sat, 3 Apr 2004 09:31:32 +1200
cdargs (1.28-2) unstable; urgency=low
* Changed maintainer in debian/control to the new debian address.
-- Petra Malik <petra@debian.org> Sat, 13 Mar 2004 20:43:16 +1300
cdargs (1.28-1) unstable; urgency=low
* Update to the latest version of debian policy (standards-version 3.6.1).
* Clean up debian/copyright file.
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Wed, 31 Dec 2003 17:36:14 +1300
cdargs (1.26-2) unstable; urgency=low
* Renamed function abort to build with g++-3.3 (Closes: #195146)
* Upgraded to Standards-Version 3.5.10 (no changes necessary)
-- Petra Malik <Petra.Malik@xtra.co.nz> Thu, 29 May 2003 18:10:40 +1200
cdargs (1.26-1) unstable; urgency=low
* Changed compiling options to comply with debian-policy.
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Wed, 26 Feb 2003 22:48:42 +1300
cdargs (1.25-1) unstable; urgency=low
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Tue, 18 Feb 2003 20:29:30 +1300
cdargs (1.24-1) unstable; urgency=low
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Fri, 14 Feb 2003 09:46:10 +1300
cdargs (1.23-1) unstable; urgency=low
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Fri, 7 Feb 2003 12:25:46 +1300
cdargs (1.22-1) unstable; urgency=low
* New upstream release
-- Petra Malik <Petra.Malik@xtra.co.nz> Wed, 5 Feb 2003 12:37:13 +1300
cdargs (1.21-1) unstable; urgency=low
* Changed the manual page to comply with the debian package.
* New upstream release. (Closes: #178280, #178286)
-- Petra Malik <Petra.Malik@xtra.co.nz> Fri, 31 Jan 2003 11:01:56 +1300
cdargs (1.20-2) unstable; urgency=low
* Added missing build dependency libncurses5-dev. (Closes: #178118)
-- Petra Malik <Petra.Malik@xtra.co.nz> Fri, 24 Jan 2003 11:47:07 +1300
cdargs (1.20-1) unstable; urgency=low
* Initial Release. (Closes: #171357)
* Changed to compile with g++-3.2.2.
* Changed to comply with debian-policy (use /usr/bin/editor instead of vi).
-- Petra Malik <Petra.Malik@xtra.co.nz> Wed, 1 Jan 2003 12:25:26 +1300
Source: cdargs
Section: utils
Priority: optional
Maintainer: Petra Malik <petra@debian.org>
Build-Depends: debhelper (>= 5.0.0), libncurses5-dev
Standards-Version: 3.6.2
Package: cdargs
Architecture: any
Depends: ${shlibs:Depends}
Description:bookmarks and browsing for the cd command
cdargs is a little tool for the console which enables bookmarks and
browsing in your shell builtin cd command.
This package was debianized by Petra Malik <Petra.Malik@xtra.co.nz> on
Wed, 1 Jan 2003 12:25:26 +1300.
It was downloaded from http://www.skamphausen.de/software/cdargs/
Upstream Authors: Stefan Kamphausen <mail@skamphausen.de>,
Claus Brunzema <mail@cbrunzema.de>
Copyright (c) 2001-2003 Stefan Kamphausen <mail@skamphausen.de>
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
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
On Debian systems, the complete text of the GNU General Public
License, version 2, can be found in /usr/share/common-licenses/GPL-2.
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CXXFLAGS = -ansi -pedantic -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CXXFLAGS += -O0
else
CXXFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
config.status: configure
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
CXXFLAGS="$(CXXFLAGS)"
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
-test -r /usr/share/misc/config.sub && \
cp -f /usr/share/misc/config.sub config.sub
-test -r /usr/share/misc/config.guess && \
cp -f /usr/share/misc/config.guess config.guess
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/cdargs.
$(MAKE) install prefix=$(CURDIR)/debian/cdargs/usr
install -d $(CURDIR)/debian/cdargs/usr/share/emacs/site-lisp/
cp contrib/cdargs.el $(CURDIR)/debian/cdargs/usr/share/emacs/site-lisp/
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs README THANKS TODO
dh_installexamples contrib/cdargs-bash.sh contrib/cdargs-tcsh.csh
dh_installemacsen
dh_installman
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress -X.sh
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
......@@ -284,19 +284,22 @@ bold font (if the terminal emulation understands that attribute).
.SH "FILES"
.I "/usr/bin/cdargs"
the cdargs executable.
.TP
.I "$HOME/.cdargs"
personal bookmarks file.
.TP
.I "$HOME/.cdargsresult"
temporary file for passing results to shell.
.TP
.I "contrib/cdargs-bash.sh"
.I "/usr/share/doc/cdargs/examples/cdargs-bash.sh"
example collection of bash functions.
.TP
.I "contrib/cdargs-tcsh.csh"
.I "/usr/share/doc/cdargs/examples/cdargs-tcsh.csh"
example collection of tcsh functions.
.TP
.I "contrib/cdargs.el"
.I "/usr/share/emacs/site-lisp/cdargs.el"
(X)Emacs front-end to personal bookmarks file
.SH "REPORTING BUGS"
......
......@@ -2,7 +2,7 @@ bin_PROGRAMS = cdargs
#AM_CXXFLAGS = -g -ansi -pedantic -Wall -W
#AM_CXXFLAGS = -g -ansi -Wall -W
AM_CXXFLAGS = -g -Wall -W
#AM_CXXFLAGS = -g -Wall -W
# CXXFLAGS = -O2
# EXTRA_DIST = OOREDESIGN
......
......@@ -67,7 +67,7 @@ bin_PROGRAMS = cdargs
#AM_CXXFLAGS = -g -ansi -pedantic -Wall -W
#AM_CXXFLAGS = -g -ansi -Wall -W
AM_CXXFLAGS = -g -Wall -W
#AM_CXXFLAGS = -g -Wall -W
# CXXFLAGS = -O2
# EXTRA_DIST = OOREDESIGN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment