diff --git a/.config/fish/pacman.fish b/.config/fish/pacman.fish index bd82e994..e51873a5 100644 --- a/.config/fish/pacman.fish +++ b/.config/fish/pacman.fish @@ -1,9 +1,6 @@ set -l listinstalled "(pacman -Q | string replace ' ' \t)" set -l listall "(__fish_print_packages)" -function pacfiles -d 'List of files in pacman package packages sorted by size' - pacman -Qlq $argv | grep -v '/$' | xargs du -cbh | sort -h -end complete -c pacfiles -a "$listinstalled" function pacls -d 'List/open package files with fzf' @@ -13,8 +10,3 @@ function pacls -d 'List/open package files with fzf' [ "$result" ]; and commandline -- $result end complete -c pacls -a "$listinstalled" - -function paclog -a size -d 'Pacman last installed packages' - [ $size ]; or set size 30 - expac -t '%F %T' '%-8l %n' | sort -rn | head -$size -end diff --git a/.emacs.d/lisp/mode-eshell.el b/.emacs.d/lisp/mode-eshell.el index 5fe749e0..47d74e93 100644 --- a/.emacs.d/lisp/mode-eshell.el +++ b/.emacs.d/lisp/mode-eshell.el @@ -51,7 +51,6 @@ ;;; ;;; `eshell/alias' is too slow as it reads and write the file on each definition. ;;; Let's write manually instead. -;;; TODO: Add pacman functions from fish config. (with-eval-after-load 'em-alias (eshell-read-aliases-list) (dolist diff --git a/.scripts/pacfiles b/.scripts/pacfiles new file mode 100755 index 00000000..7e62873e --- /dev/null +++ b/.scripts/pacfiles @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "$1" = "-h" ]; then + cat <&2 +Usage: ${0##*/} [PACKAGES] + +List of files in pacman packages sorted by size + +EOF + exit +fi + +pacman -Qlq "$@" | grep -v '/$' | xargs du -cbh | sort -h diff --git a/.scripts/pachist b/.scripts/pachist new file mode 100755 index 00000000..c4c40510 --- /dev/null +++ b/.scripts/pachist @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "$1" = "-h" ]; then + cat <&2 +Usage: ${0##*/} [COUNT] + +List pacman's COUNT last installed packages + +EOF + exit +fi + +[ -z "$1" ] && set -- 30 +expac -t '%F %T' '%-8l %n' | sort -rn | head -$1 diff --git a/.scripts/pacsize b/.scripts/pacsize index 3be5e26d..bb6cb145 100755 --- a/.scripts/pacsize +++ b/.scripts/pacsize @@ -179,5 +179,3 @@ fi buffer=$(LC_ALL=C pacman -Qi "$@" 2>&1 1>&3 3>&- | cut -f2 -d "'") [ -n "$buffer" ] && LC_ALL=C pacman -Si "$buffer" } 3>&1 | filter | { $opt_sort || remove_duplicates ;} | { $opt_total || cat ;} - -# vim: set noet: