feat: 彻底抛弃bwrap,提升aptss响应速度。现已可将aptss当apt用

This commit is contained in:
2023-03-06 21:45:12 +08:00
parent aa85ee53a8
commit 9a7a80223a
8 changed files with 43 additions and 34 deletions

View File

@@ -63,7 +63,7 @@ _aptss()
# Complete a -t<SPACE><TAB>
case $prev in
-t|--target-release)
COMPREPLY=( $( compgen -W "$( apt-cache policy -o Dir::Cache="/etc/aptss/" | egrep -o 'a=[^,]*|n=[^,]*' | cut -f2- -d= | sort -u)" -- "$cur" ) )
COMPREPLY=( $( compgen -W "$( apt-cache policy -o Dir::Cache="/var/lib/aptss/" | egrep -o 'a=[^,]*|n=[^,]*' | cut -f2- -d= | sort -u)" -- "$cur" ) )
return 0
;;
esac
@@ -185,12 +185,12 @@ _aptss()
return 0
;;
show|list|download|changelog|depends|rdepends)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/var/lib/aptss/" \
2> /dev/null ) )
return 0
;;
install)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/var/lib/aptss/" \
2> /dev/null ) )
if [[ "$cur" == ./* || "$cur" == /* ]]; then
_filedir "deb"
@@ -198,8 +198,8 @@ _aptss()
return 0
;;
source|build-dep|showsrc|policy)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/etc/aptss/" \
2> /dev/null ) $( apt-cache dumpavail -o Dir::Cache="/etc/aptss/" | \
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" -o Dir::Cache="/var/lib/aptss/" \
2> /dev/null ) $( apt-cache dumpavail -o Dir::Cache="/var/lib/aptss/" | \
command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
return 0
;;