diff options
author | Anthony Wang | 2024-11-22 21:01:06 -0500 |
---|---|---|
committer | Anthony Wang | 2024-11-22 21:01:06 -0500 |
commit | a4fa177b3f84d8c1cb8b77e08475d973bcee8032 (patch) | |
tree | 241192927ebc0327934cd872ce189ad13d4a81ca /fish | |
parent | e4e179af81385327314cbe007cbba7cbd5a38875 (diff) |
Add system management Fish functions
Diffstat (limited to 'fish')
-rw-r--r-- | fish/functions/pacprov.fish | 3 | ||||
-rw-r--r-- | fish/functions/pacreq.fish | 3 | ||||
-rw-r--r-- | fish/functions/sysusers.fish | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/fish/functions/pacprov.fish b/fish/functions/pacprov.fish new file mode 100644 index 0000000..729bc7a --- /dev/null +++ b/fish/functions/pacprov.fish @@ -0,0 +1,3 @@ +function pacprov + pacman -Qi | grep ^Provides | grep -wo "[^ ]*" | sort | uniq -d | grep -v ":\|None\|Provides" +end diff --git a/fish/functions/pacreq.fish b/fish/functions/pacreq.fish new file mode 100644 index 0000000..e6e057b --- /dev/null +++ b/fish/functions/pacreq.fish @@ -0,0 +1,3 @@ +function pacreq + pacman -Qi (pacman -Qeq) | grep "Name\|Required" | grep -v None | grep "Required" -B1 +end diff --git a/fish/functions/sysusers.fish b/fish/functions/sysusers.fish new file mode 100644 index 0000000..eef7b11 --- /dev/null +++ b/fish/functions/sysusers.fish @@ -0,0 +1,4 @@ +function sysusers + diff (awk -F: '$3 < 1000 {print $1}' /etc/passwd | sort | psub) (systemd-sysusers --tldr | awk '$1 == "u" {print $2}' | grep -v nobody | sort | psub) + diff (awk -F: '$3 < 1000 {print $1}' /etc/group | sort | psub) (systemd-sysusers --tldr | awk '$1 == "u" || $1 == "g" {print $2}' | grep -v nobody | sort | uniq | psub) +end |