mirror of https://github.com/garabik/grc.git
conffile can be a pipe
This commit is contained in:
parent
79f8c178d0
commit
82ca58087c
3
grc
3
grc
|
@ -93,7 +93,8 @@ if cfile == "":
|
|||
conffilenames += [home + '/.grc/grc.conf']
|
||||
conffilenames += ['/usr/local/etc/grc.conf', '/etc/grc.conf']
|
||||
for i in conffilenames:
|
||||
if os.path.isfile(i):
|
||||
# test if conffile exists, it can be also a pipe
|
||||
if os.path.exists(i) and not os.path.isdir(i):
|
||||
conffile = i
|
||||
break
|
||||
regexplist = []
|
||||
|
|
3
grcat
3
grcat
|
@ -106,7 +106,8 @@ if len(sys.argv) != 2:
|
|||
|
||||
conffile_arg = sys.argv[1] # tentative conffile
|
||||
for i in conffilepath:
|
||||
if os.path.isfile(i+conffile_arg):
|
||||
# test if conffile exists, it can be also a pipe
|
||||
if os.path.exists(i+conffile_arg) and not os.path.isdir(i+conffile_arg):
|
||||
conffile = i+conffile_arg
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in New Issue