mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Do not open CLI browsers when using fish_config.
From the Python webbrowser documentation: "If text-mode browsers are used, the calling process will block until the user exits the browser." Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests. Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable. For now, disable CLI browsers and recommend opening the page in a graphical browser. In the future, maybe write a CLI utility to change prompts and delete history items.
This commit is contained in:
parent
63a15e232b
commit
168d25e780
1 changed files with 7 additions and 1 deletions
|
@ -15,9 +15,15 @@ else:
|
|||
import http.server as SimpleHTTPServer
|
||||
import socketserver as SocketServer
|
||||
from urllib.parse import parse_qs
|
||||
|
||||
# Disable CLI web browsers
|
||||
term = os.environ.pop('TERM', None)
|
||||
import webbrowser
|
||||
if term:
|
||||
os.environ['TERM'] = term
|
||||
|
||||
import subprocess
|
||||
import re, socket, os, sys, cgi, select, time, glob
|
||||
import re, socket, cgi, select, time, glob
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in a new issue