diff options
| -rw-r--r-- | arch/list_explicit_packages.fish | 10 | ||||
| -rw-r--r-- | arch/list_newest_packages.fish | 7 | ||||
| -rw-r--r-- | config/fish/config.fish | 4 |
3 files changed, 21 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 diff --git a/config/fish/config.fish b/config/fish/config.fish index fb0b8bc..88a4275 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -48,6 +48,10 @@ end # autoload functions and completions in .dotfiles set fish_function_path $DOTFILES_LOCATION/config/fish/functions $fish_function_path +# add arch specific functions +if type -q pacman + set fish_function_path $DOTFILES_LOCATION/arch $fish_function_path +end set fish_complete_path $DOTFILES_LOCATION/config/fish/completions $fish_complete_path # add git-alias subdirectory to functions path |
