Compare commits
No commits in common. "7fb495cab52b0932b961fa66fb15cbb87916128d" and "0db1486d2767e8cc74905a26d88b5c0c0c5556a2" have entirely different histories.
7fb495cab5
...
0db1486d27
|
|
@ -15,16 +15,16 @@ _xdg-mime_query() {
|
||||||
"*::arg:->args"
|
"*::arg:->args"
|
||||||
|
|
||||||
case $line[1] in
|
case $line[1] in
|
||||||
filetype) _files ;;
|
filetype) _arguments '*: :_files' ;;
|
||||||
default) _mime_types ;;
|
default) _arguments '*: :_mime_types' ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_xdg-mime() {
|
_xdg-mime() {
|
||||||
local line
|
local line
|
||||||
local -a appdirs=(
|
local -A appdirs=(
|
||||||
/usr/share/applications
|
/usr/share/applications
|
||||||
"$HOME/.local/share/applications"
|
$HOME/.local/share/applications
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
|
|
@ -38,7 +38,7 @@ _xdg-mime() {
|
||||||
query) _xdg-mime_query ;;
|
query) _xdg-mime_query ;;
|
||||||
default)
|
default)
|
||||||
_arguments \
|
_arguments \
|
||||||
"1:Application:_files -W appdirs -g '*.desktop'" \
|
"1:Application:_files -W '$appdirs' -g '*.desktop'" \
|
||||||
'2: :_mime_types'
|
'2: :_mime_types'
|
||||||
;;
|
;;
|
||||||
install)
|
install)
|
||||||
|
|
@ -59,12 +59,4 @@ _xdg-mime() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_xdg-mime "$@"
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: Shell-Script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# indent-tabs-mode: nil
|
|
||||||
# sh-basic-offset: 2
|
|
||||||
# End:
|
|
||||||
# vim: filetype=zsh expandtab softtabstop=2 tabstop=2 shiftwidth=2
|
# vim: filetype=zsh expandtab softtabstop=2 tabstop=2 shiftwidth=2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue