mirror of https://github.com/adamdruppe/arsd.git
Replace deprecated getenv(X) with environment[X].
This commit is contained in:
parent
8a925179ad
commit
3931c20de4
|
@ -303,7 +303,7 @@ struct Terminal {
|
||||||
bool terminalInFamily(string[] terms...) {
|
bool terminalInFamily(string[] terms...) {
|
||||||
import std.process;
|
import std.process;
|
||||||
import std.string;
|
import std.string;
|
||||||
auto term = getenv("TERM");
|
auto term = environment["TERM"];
|
||||||
foreach(t; terms)
|
foreach(t; terms)
|
||||||
if(indexOf(term, t) != -1)
|
if(indexOf(term, t) != -1)
|
||||||
return true;
|
return true;
|
||||||
|
@ -393,9 +393,9 @@ struct Terminal {
|
||||||
import std.string;
|
import std.string;
|
||||||
import std.array;
|
import std.array;
|
||||||
|
|
||||||
string termcapData = getenv("TERMCAP");
|
string termcapData = environment["TERMCAP"];
|
||||||
if(termcapData.length == 0) {
|
if(termcapData.length == 0) {
|
||||||
termcapData = getTermcapDatabase(getenv("TERM"));
|
termcapData = getTermcapDatabase(environment["TERM"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto e = replace(termcapData, "\\\n", "\n");
|
auto e = replace(termcapData, "\\\n", "\n");
|
||||||
|
|
Loading…
Reference in New Issue