Skip to content

Commit

Permalink
✨ Add sysctl, lsof, arp, netstat, ss, archlinux-java, coredumpctl
Browse files Browse the repository at this point in the history
Update ip
  • Loading branch information
Freed-Wu committed Jan 4, 2024
1 parent 592d286 commit d74f60a
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 1 deletion.
9 changes: 9 additions & 0 deletions sources/archlinux-java.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# :fzf-tab:complete:(\\|*/|)archlinux-java:argument-1
case $word in
(get|status))
archlinux-java $word
;;
help)
archlinux-java $word | bat --color=always -pplhelp
;;
esac
6 changes: 6 additions & 0 deletions sources/arp.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)arp:argument-1
case $group in
host)
arp $word
;;
esac
6 changes: 6 additions & 0 deletions sources/coredumpctl.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)coredumpctl:argument-rest
case $group in
coredumps)
coredumpctl info $word | bat --color=always -plyaml
;;
esac
5 changes: 4 additions & 1 deletion sources/ip.zsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# :fzf-tab:complete:(\\|*/|)ip:
case $group in
'ip command')
ip $word help 2>&1 | bat --color=always -plhelp
grc --colour=on ip $word
;;
*' command')
ip ${group%% *} help 2>&1 | bat --color=always -plhelp
;;
esac
9 changes: 9 additions & 0 deletions sources/lsof.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# :fzf-tab:complete:(\\|*/|)lsof:option-i-1
case $group in
port)
lsof -i :$word
;;
*)
lsof -i $word
;;
esac
8 changes: 8 additions & 0 deletions sources/netstat.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# :fzf-tab:complete:(\\|*/|)netstat:options
case $group in
option)
[[ $word == -(h|-help) ]] &&
netstat $word | bat --color=always -plhelp ||
grc --colour=on netstat $word
;;
esac
8 changes: 8 additions & 0 deletions sources/ss.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# :fzf-tab:complete:(\\|*/|)ss:values
case $group in
option)
[[ $word == -(h|-help) ]] &&
ss $word | bat --color=always -plhelp ||
grc --colour=on ss $word
;;
esac
6 changes: 6 additions & 0 deletions sources/sysctl.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :fzf-tab:complete:(\\|*/|)sysctl:argument-rest
case $group in
'sysctl variable')
sysctl $realpath | bat --color=always -pltoml
;;
esac

0 comments on commit d74f60a

Please sign in to comment.