diff --git a/share/completions/perl.fish b/share/completions/perl.fish index 620261e52..83203585a 100644 --- a/share/completions/perl.fish +++ b/share/completions/perl.fish @@ -2,7 +2,7 @@ begin set -l unicode 'commandline | __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"' set -l noopt 'commandline | not __fish_sgrep -qe "-[a-zA-Z]*C[a-zA-Z]*\$"' set -l modules "(find (perl -lE'print for @INC') -name '*.pm' -printf '%P\n' ^/dev/null \ - | awk '{ gsub(\"/\", \"::\") } /[^-.]/' RS='\\\\\\\\.pm'\n | sort -u)" + | sed -e 's,/,::,g; s,\.pm$,,' | sort -u)" complete -c perl -s 0 -n $noopt --description 'Specify record separator' complete -c perl -s a -n $noopt --description 'Turn on autosplit mode' complete -c perl -s c -n $noopt --description 'Check syntax' diff --git a/share/completions/xprop.fish b/share/completions/xprop.fish index da56ea609..25bc299c3 100644 --- a/share/completions/xprop.fish +++ b/share/completions/xprop.fish @@ -1,3 +1,7 @@ +function __fish_xprop_list_properties + # TODO search commandline for a target window ("-root" or "-name foo") + xprop -root | cut -d'(' -f 1 +end complete -c xprop -o help --description "Display help and exit" complete -c xprop -o grammar --description "Display grammar and exit" @@ -10,23 +14,9 @@ complete -c xprop -o len -x --description "Maximum display length" complete -c xprop -o notype --description "Do not show property type" complete -c xprop -o fs -r --description "Set format file" complete -c xprop -o frame --description "Select a window by clicking on its frame" -complete -c xprop -o remove --description "Remove property" -x -a " -( - xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1 -) -" - -complete -c xprop -o set --description "Set property" -x -a " -( - xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1 -) -" - +complete -c xprop -o remove --description "Remove property" -x -a "( __fish_xprop_list_properties)" +complete -c xprop -o set --description "Set property" -x -a " (__fish_xprop_list_properties)" complete -c xprop -o spy --description "Examine property updates forever" complete -c xprop -o f --description "Set format" -complete -c xprop -d Property -x -a " -( - xprop -root -notype|cut -d ' ' -f 1|cut -d \t -f 1 -) -" +complete -c xprop -d Property -x -a "( __fish_xprop_list_properties)" diff --git a/share/functions/__fish_complete_lsusb.fish b/share/functions/__fish_complete_lsusb.fish index eba9cd29e..b6814b29f 100644 --- a/share/functions/__fish_complete_lsusb.fish +++ b/share/functions/__fish_complete_lsusb.fish @@ -1,3 +1,3 @@ function __fish_complete_lsusb - lsusb | awk '{print $2 ":" $4}' | cut -c1-7 + lsusb | awk -F[ :] '{ print $2 ":" $4 }' end