mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
misc improvements to scripts
This commit is contained in:
parent
e8bed9e038
commit
0814797444
3 changed files with 9 additions and 19 deletions
|
@ -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'
|
||||
|
|
|
@ -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)"
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function __fish_complete_lsusb
|
||||
lsusb | awk '{print $2 ":" $4}' | cut -c1-7
|
||||
lsusb | awk -F[ :] '{ print $2 ":" $4 }'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue