Skip to content

Commit 9373ca9

Browse files
authored
Merge pull request #84 from tropf/resize-iff-possible
shell config: only resize if on tty
2 parents 93e314c + 6543d38 commit 9373ca9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

share/modules/nixos-shell-config.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ in {
112112
path = builtins.getEnv "PATH";
113113
in
114114
''
115-
# fix terminal size
116-
eval "$(resize)"
115+
# if terminal with stdout, fix terminal size
116+
if [ -t 1 ]; then eval "$(resize)"; fi
117117
118118
${lib.optionalString (pwd != "") "cd '${pwd}' 2>/dev/null"}
119119
${lib.optionalString (term != "") "export TERM='${term}'"}

0 commit comments

Comments
 (0)