Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

use the mimetype command instead of the file command #133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

@dylanaraps
Copy link
Owner

I think keeping this as file is fine as the "errors" occur on plain-text files which are then opened in the text editor regardless of type. Care to elaborate on why you believe this change is needed?

@wukuan405
Copy link
Author

i have a typescript file, but file command return wrong type as following.

curl -sSL https://raw.githubusercontent.com/howdy39/gas-clasp-starter/master/src/sheet.service.ts | file -biL -
application/x-sc; charset=us-ascii

@wukuan405
Copy link
Author

sure, file command and if error, xdg-open should keep simple as you said.

@wukuan405
Copy link
Author

wukuan405 commented Oct 21, 2019

but i do not understand why nohup and disown it instead of use xdg-open directly.
I am using fff from remote and nothing will happen if file command return error.
why not

                  clear_screen
                  reset_terminal
                  "${VISUAL:-${EDITOR:-xdg-open}}" "$1"
                  setup_terminal
                  redraw
                  # 'nohup':  Make the process immune to hangups.
                  # '&':      Send it to the background.
                  # 'disown': Detach it from the shell.
                  #nohup "${FFF_OPENER:-${opener:-xdg-open}}" "$1" &>/dev/null &
                  #disown

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants