From 036ef0c3a8f7c0aad44513ef0055b92a6800fc69 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Sun, 24 Mar 2002 19:26:34 +0000 Subject: [PATCH] - _ncftp(): replace cut with sed, since the existing cut command uses --output-delimiter, which FreeBSD's cut doesn't have. We now also output only the name of the bookmark, not the expansion to which it points. --- bash_completion | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bash_completion b/bash_completion index bab7be77..f38f7869 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05a # -# $Id: bash_completion,v 1.216 2002/03/24 20:05:07 ianmacd Exp $ +# $Id: bash_completion,v 1.217 2002/03/24 20:26:34 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -1958,8 +1958,8 @@ _ncftp() cur=${COMP_WORDS[COMP_CWORD]} if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then - COMPREPLY=( $( compgen -W '`cut --output-delimiter " " \ - -s -f1-2 -d, ~/.ncftp/bookmarks`' -- $cur ) ) + COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\+\),.*$/\1/p" \ + ~/.ncftp/bookmarks )' -- $cur ) ) fi return 0