mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-19 09:08:47 +00:00
Add smart_rule updates
This commit is contained in:
parent
7c8936d965
commit
c8fe0f771f
@ -1,20 +1,21 @@
|
|||||||
import sys
|
import sys
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from ..conf import settings
|
from thefuck.conf import settings
|
||||||
|
from thefuck.const import SHELL_LOGGER_SOCKET_PATH
|
||||||
SHELL_LOGGER_SOCKET = '__SHELL_LOGGER_SOCKET'
|
|
||||||
|
|
||||||
|
|
||||||
def match(command):
|
def match(command):
|
||||||
|
import ipdb; ipdb.set_trace()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
|
import ipdb; ipdb.set_trace()
|
||||||
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
list_of_commands = []
|
list_of_commands = []
|
||||||
try:
|
try:
|
||||||
sock.connect(settings.env.get(SHELL_LOGGER_SOCKET))
|
sock.connect(settings.env.get(SHELL_LOGGER_SOCKET_PATH))
|
||||||
sock.sendall(command)
|
sock.sendall(command)
|
||||||
number_of_strings = int.from_bytes(sock.recv(1), sys.byteorder)
|
number_of_strings = int.from_bytes(sock.recv(1), sys.byteorder)
|
||||||
for i in range(number_of_strings):
|
for i in range(number_of_strings):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user