Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
rupa committed Feb 17, 2009
1 parent e66e7fb commit dc0e0cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions j.sh
Expand Up @@ -37,11 +37,13 @@ j() {
BEGIN { split(q,a," ") }
{ for( o in a ) $1 !~ a[o] && $1 = ""; if( $1 ) print $2 "\t" $1 }
' $jfile | sort -nr
# for completion
elif [ "$1" = "--complete" ];then
awk -v q="$3" -F"|" '
BEGIN { split(q,a," ") }
{ for( o in a ) $1 !~ a[o] && $1 = ""; if( $1 ) print $1 }
' $jfile
# if we hit enter on a completion just go there
elif [ "${1:0:1}" = "/" -a -d "$*" ]; then
cd "$*"
else
Expand Down

0 comments on commit dc0e0cb

Please sign in to comment.