mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Add function wrapper for mimedb
This commit is contained in:
parent
93dfb6f7d6
commit
8b40f09e17
12
share/functions/mimedb.fish
Normal file
12
share/functions/mimedb.fish
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Wrap mimedb in a function so it does not have to be found in PATH
|
||||||
|
# But only if it's installed
|
||||||
|
if test -x $__fish_bin_dir/mimedb
|
||||||
|
eval "function mimedb --description 'Look up file information via the mimedb database'
|
||||||
|
\"$__fish_bin_dir/mimedb\" \$argv
|
||||||
|
end"
|
||||||
|
else
|
||||||
|
function mimedb --description 'Look up file information via the mimedb database'
|
||||||
|
# Create a function that simply fails, because mimedb not installed
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user