Several new scripts added
This commit is contained in:
parent
1809ffacb3
commit
cdbcc9692a
5 changed files with 82 additions and 0 deletions
17
misc/xdg-info
Executable file
17
misc/xdg-info
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/zsh
|
||||
|
||||
source ${$(realpath "$0"):h:h}/lib/common.zsh
|
||||
|
||||
if ! exists column; then
|
||||
column() { cat }
|
||||
fi
|
||||
|
||||
{
|
||||
echo -e "file\ttype\tdefault program"
|
||||
for file in "$@"; do
|
||||
mimetype=$(xdg-mime query filetype $file)
|
||||
prog=$(xdg-mime query default $mimetype)
|
||||
echo -e "$file\t$mimetype\t$prog"
|
||||
done
|
||||
} | column -t -s $'\t'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue