Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ada3aafd2c | |||
beae2098fb |
@@ -4,7 +4,7 @@ sx-open is an attempt to implement a saner alternative to xdg-open.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Clone the repo, drop sx-open.cfg into your $HOME/.config.
|
Clone the repo, drop sx-open.cfg into your $HOME/.config and set it up to do what you want. There are no built-in defaults, it's all in the config.
|
||||||
As this thing is meant to replace xdg-open, you will probably want to link sx-open into xdg-open somewhere in your $PATH as to override the default one.
|
As this thing is meant to replace xdg-open, you will probably want to link sx-open into xdg-open somewhere in your $PATH as to override the default one.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
2
sx-open
2
sx-open
@@ -116,7 +116,7 @@ handle_target() {
|
|||||||
|
|
||||||
[[ "$target" =~ ^/.* ]] || { target="${PWD}/${target}"; } # Turn relative paths to absolute ones.
|
[[ "$target" =~ ^/.* ]] || { target="${PWD}/${target}"; } # Turn relative paths to absolute ones.
|
||||||
|
|
||||||
IFS=';' read target_mimetype charset <<< $( file -ib "$target" )
|
IFS=';' read target_mimetype charset <<< $( file -ibL "$target" )
|
||||||
target_left=$target_mimetype
|
target_left=$target_mimetype
|
||||||
|
|
||||||
set -- "${mime_handlers[@]}"
|
set -- "${mime_handlers[@]}"
|
||||||
|
Reference in New Issue
Block a user