mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
common-aliases: Replace static document program associations with calls to (xdg-)open
This commit is contained in:
parent
f246f4612a
commit
b58bf31444
1 changed files with 22 additions and 6 deletions
|
@ -136,12 +136,28 @@ if is-at-least 4.2.0; then
|
||||||
for ft in $_media_fts; do alias -s $ft=$XMVIEWER; done
|
for ft in $_media_fts; do alias -s $ft=$XMVIEWER; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#read documents
|
#open complex document formats using the system viewer
|
||||||
alias -s pdf=acroread
|
_document_fts=(
|
||||||
alias -s ps=gv
|
# Long-term storage formats
|
||||||
alias -s dvi=xdvi
|
djvu dvi fb2 epub pdf ps rtf
|
||||||
alias -s chm=xchm
|
# Office Binary & Office OpenXML
|
||||||
alias -s djvu=djview
|
doc docx docm ppt pptx pptm xls xlsx xlsm
|
||||||
|
# OpenDocument
|
||||||
|
odt fodt ods fods odp fodp odg fodg odf
|
||||||
|
# Uniform Office Format
|
||||||
|
uof uot uos uop
|
||||||
|
# StarOffice
|
||||||
|
sdw sxw sdc sxc sdd sci sda sxd smf sxm
|
||||||
|
# WordPerfect
|
||||||
|
wpd wp wp4 wp5 wp6 wp7
|
||||||
|
# Others
|
||||||
|
abw gnm gnumeric pages hwp
|
||||||
|
)
|
||||||
|
if type xdg-open >/dev/null; then
|
||||||
|
for ft in $_document_fts; do alias -s $ft=xdg-open; done
|
||||||
|
elif type open >/dev/null; then
|
||||||
|
for ft in $_document_fts; do alias -s $ft=open; done
|
||||||
|
fi
|
||||||
|
|
||||||
#list whats inside packed file
|
#list whats inside packed file
|
||||||
alias -s zip="unzip -l"
|
alias -s zip="unzip -l"
|
||||||
|
|
Loading…
Reference in a new issue