mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
lyxpaperview: take the first match
This commit is contained in:
parent
d44929ff81
commit
0d98fb8548
@ -84,7 +84,7 @@ def find(args, path):
|
|||||||
# have this already
|
# have this already
|
||||||
continue
|
continue
|
||||||
px = subprocess.Popen(['grep', '-i', arg], stdin=px.stdout, stdout=subprocess.PIPE)
|
px = subprocess.Popen(['grep', '-i', arg], stdin=px.stdout, stdout=subprocess.PIPE)
|
||||||
p4 = subprocess.Popen(['head', '-n 2'], stdin=px.stdout, stdout=subprocess.PIPE)
|
p4 = subprocess.Popen(['head', '-n 1'], stdin=px.stdout, stdout=subprocess.PIPE)
|
||||||
p1.stdout.close()
|
p1.stdout.close()
|
||||||
output = p4.communicate()
|
output = p4.communicate()
|
||||||
return output[0].decode("utf8")[:-1]# strip trailing '\n'
|
return output[0].decode("utf8")[:-1]# strip trailing '\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user