about summary refs log tree commit diff
path: root/xpkg
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-12-06 16:04:01 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-12-06 16:04:39 +0100
commit67a049b48ae609a4ea7379a764674bfe52f344ed (patch)
treeea33eb9ce543849ec8d53b8f727f7b098327e18d /xpkg
parent52a422e07620617f1fde63e06dcaa3ac8e9b52f1 (diff)
downloadxtools-67a049b48ae609a4ea7379a764674bfe52f344ed.tar.gz
xtools-67a049b48ae609a4ea7379a764674bfe52f344ed.tar.xz
xtools-67a049b48ae609a4ea7379a764674bfe52f344ed.zip
xpkg: add -L for non-remotely installed packages
Diffstat (limited to 'xpkg')
-rwxr-xr-xxpkg8
1 files changed, 5 insertions, 3 deletions
diff --git a/xpkg b/xpkg
index d534d41..13f34df 100755
--- a/xpkg
+++ b/xpkg
@@ -1,5 +1,5 @@
 #!/bin/bash
-# xpkg [-RamOHDvV] - convenient package lister
+# xpkg [-RamOHDLvV] - convenient package lister
 
 flags=
 filter0='/^.[^i*].\? /d'
@@ -7,13 +7,14 @@ filter1='s/^...\? //'
 filter2='s/-[^- ]* .*//'
 mode="--search="
 
-while getopts R:vVmOHDa flag; do
+while getopts R:vVmOHDLa flag; do
 	case "$flag" in
 		D) exec comm -23 <(xpkg | sort) <(xpkg -a | sort);;
+		L) mode="--regex -p repository -s /"; filter0='/:\/\//d';;
 		R) flags="$flags -i --repository=$OPTARG";;
 		m|O|H) mode="-$flag"; filter0=; filter1=; filter2='s/-[^-]*$//';;
 		a) flags="$flags -R"; filter0=;;
-		v) filter2='s/ .*//';;
+		v) filter2='s/:\? .*//';;
 		V) filter2=;;
 		?) printf "Usage: %s [-RamOHvV]
   -R REPO  consider only packages from REPO
@@ -22,6 +23,7 @@ while getopts R:vVmOHDa flag; do
   -O       list orphaned packages
   -H       list packages on hold
   -D       list installed packages not in repo
+  -L       list installed packages not from remote repos
   -v       show version numbers
   -V       show version numbers and description
 " $0 1>&2