From 2b134724192350e86476540c1a271a85f7c9171b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Martinez?= Date: Sat, 28 Jan 2017 20:41:32 +0100 Subject: [PATCH] Improve htop completion Add new options Add description at the top of the file Fix `--sort-key` completions --- share/completions/htop.fish | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/share/completions/htop.fish b/share/completions/htop.fish index c4894a9de..b8cdace88 100644 --- a/share/completions/htop.fish +++ b/share/completions/htop.fish @@ -1,5 +1,11 @@ -# Completions for top -complete -c htop -s d --description "Update interval" -x -complete -c htop -s u --description "Monitor effective UID" -x -a "(__fish_complete_users)" -complete -c htop -l sort-key -d 'Sort column' -xa "(htop --sort-key '')" +# htop is an interactive process viewer. +# See: http://hisham.hm/htop +complete -c htop -l delay -s d -d 'Update interval' -x +complete -c htop -l no-color -s C -d 'Start htop in monochrome mode' +complete -c htop -l no-colour -d 'Start htop in monochrome mode' +complete -c htop -l help -s h -d 'Show help and exit' +complete -c htop -l pid -s p -d 'Show only given PIDs' -x -a '(__fish_append , (__fish_complete_pids))' +complete -c htop -l user -s u -d 'Monitor given user' -x -a '(__fish_complete_users)' +complete -c htop -l sort-key -d 'Sort column' -xa '(htop --sort-key help)' +complete -c htop -l version -s v -d 'Show version and exit'