diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2018-01-25 16:24:17 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2018-01-25 16:24:17 +0100 |
| commit | a2bb05f5a7363441adfbd705a83884d1346d03fb (patch) | |
| tree | fc1394b82777018feec4dfcc777cf3f0392bf79e /arch/list_explicit_packages.fish | |
| parent | 816acffb39cd818482dd0de7577016dc92847808 (diff) | |
| download | dotfiles-a2bb05f5a7363441adfbd705a83884d1346d03fb.tar.gz dotfiles-a2bb05f5a7363441adfbd705a83884d1346d03fb.zip | |
add arch linux specific fish functions
Diffstat (limited to 'arch/list_explicit_packages.fish')
| -rw-r--r-- | arch/list_explicit_packages.fish | 10 |
1 files changed, 10 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 |
