mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 06:38:32 +00:00
Merge fd40122b73688a506c0aafd8069f0a114dd3bbdf into c7e7e1d884d3bb241ea6448f72a989434c2a35ec
This commit is contained in:
commit
1c6efcce1f
@ -3,7 +3,7 @@ import sys
|
||||
import tty
|
||||
import termios
|
||||
import colorama
|
||||
from distutils.spawn import find_executable
|
||||
from shutil import which
|
||||
from .. import const
|
||||
|
||||
init_output = colorama.init
|
||||
@ -38,9 +38,9 @@ def get_key():
|
||||
|
||||
|
||||
def open_command(arg):
|
||||
if find_executable('xdg-open'):
|
||||
return 'xdg-open ' + arg
|
||||
return 'open ' + arg
|
||||
""" Get a shell command calling the system's generic opener."""
|
||||
cmd = which('xdg-open') or 'open'
|
||||
return cmd + ' ' + arg
|
||||
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user