Changeset 888 for dasscm/trunk
- Timestamp:
- Jun 26, 2010, 12:16:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/usr/bin/dasscm
r887 r888 955 955 } 956 956 957 958 # 959 # use globbing to get lsit of files 960 # that matches the given prefix 961 # used for bash completion 962 # 963 sub get_complete_path_globbing( $ ) 964 { 965 my $path = shift; 966 967 # add globbing 968 $path .= "*"; 969 970 # get files 971 my @files = glob( $path ); 972 973 # if only one result is available 974 # and this result is a directory, 975 # add another result entry 976 # (otherwise complete will stop here and continue with the next parameter) 977 if( $#files == 0 ) { 978 my $path = $files[0]; 979 if( -d $path ) { 980 push( @files, $path . "/" ); 981 } 982 } 983 984 return @files; 985 } 986 987 957 988 ##################################################################### 958 989 # … … 1560 1591 1561 1592 1562 1563 1593 sub complete_path(@) 1564 1594 { … … 1574 1604 ) = get_filenames( $_[0] ); 1575 1605 1576 my $path = $filename_prod . "*"; 1577 1578 my @files = glob( $path ); 1579 1580 # if only one result is available 1581 # and this result is a directory, 1582 # add another result entry 1583 # (otherwise complete will stop here and continue with the next parameter) 1584 if( $#files == 0 ) { 1585 my $path = $files[0]; 1586 if( -d $path ) { 1587 push( @files, $path . "/" ); 1588 } 1589 } 1606 my @files = get_complete_path_globbing( $filename_prod ); 1590 1607 1591 1608 if (@files) { … … 1610 1627 ) = get_filenames( $_[0] ); 1611 1628 1612 my $path = $filename_repo . "*"; 1613 1614 my @files = glob( $path ); 1615 1616 # if only one result is available 1617 # and this result is a directory, 1618 # add another result entry 1619 # (otherwise complete will stop here and continue with the next parameter) 1620 if( $#files == 0 ) { 1621 my $path = $files[0]; 1622 if( -d $path ) { 1623 push( @files, $path . "/" ); 1624 } 1625 } 1629 my @files = get_complete_path_globbing( $filename_repo ); 1626 1630 1627 1631 if (@files) {
Note:
See TracChangeset
for help on using the changeset viewer.