aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-01-25 16:24:17 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-01-25 16:24:17 +0100
commita2bb05f5a7363441adfbd705a83884d1346d03fb (patch)
treefc1394b82777018feec4dfcc777cf3f0392bf79e /arch
parent816acffb39cd818482dd0de7577016dc92847808 (diff)
downloaddotfiles-a2bb05f5a7363441adfbd705a83884d1346d03fb.tar.gz
dotfiles-a2bb05f5a7363441adfbd705a83884d1346d03fb.zip
add arch linux specific fish functions
Diffstat (limited to 'arch')
-rw-r--r--arch/list_explicit_packages.fish10
-rw-r--r--arch/list_newest_packages.fish7
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/list_explicit_packages.fish b/arch/list_explicit_packages.fish
new file mode 100644
index 0000000..07334e5
--- /dev/null
+++ b/arch/list_explicit_packages.fish
@@ -0,0 +1,10 @@
+function list_explicit_installed_packages -d ""
+ begin; pacman -Qeq; cat /var/log/pacman.log; end | awk '
+ NF == 1 { pkgs[$0] = 1; }
+ $4 == "installed" {
+ if ($5 in pkgs) { pkgs[$5] = $1 " " $2; }
+ }
+ END {
+ for (p in pkgs) { print pkgs[p], p; }
+ }' | sort
+end
diff --git a/arch/list_newest_packages.fish b/arch/list_newest_packages.fish
new file mode 100644
index 0000000..c6c6b1e
--- /dev/null
+++ b/arch/list_newest_packages.fish
@@ -0,0 +1,7 @@
+function list_newest_packages --description "list all packages sorted by install date old->new"
+ if type -q expac
+ expac --timefmt=%s '%b\t%n' | sort -n
+ else
+ echo "expac not available!"
+ end
+end