Commit Graph

16 Commits

Author SHA1 Message Date
Indrajit Raychaudhuri 98d69fc91f zprofile: adjust condition for `LESSOPEN` export
Split tests for condition for `export LESSOPEN` separate per convention
2022-03-29 18:51:27 -05:00
Aaron Kanter 15150085e6 Only export env variables in zprofile if unset
As per [zsh documentation](https://zsh.sourceforge.io/Intro/intro_3.html) environment variables should be expected to be in `.zshenv` and not be overridden in `.zprofile`. This change modifies BROWSER (on darwin systems only), EDITOR, VISUAL, PAGER, LESS, and LESSOPEN to only use zprezto defaults if they were not previously set in the loading order.

See:
https://github.com/nix-community/home-manager/issues/2739
https://github.com/nix-community/home-manager/issues/2751
2022-03-29 18:44:37 -05:00
Indrajit Raychaudhuri 6c5657be8e zprofile: Don't exit 'less' when everything fits the screen
This aligns better with default `less` behavior and allows for
'growable content' when `less` is used as a substitute for `tail`.
2021-05-21 13:31:43 -05:00
Jeff Widman 9dfa8a67f6 Fix typo 2017-08-16 14:58:21 -07:00
Kaleb Elwert 3f556400e7 Avoid setting TMPDIR and make sure all modules handle that properly
Fixes #1206
2017-07-28 10:24:51 -07:00
Samantha McVey a4ff6acd56 [runcoms/zprofile+zshenv] Ensure TMPDIR is always set
In some cases TMPDIR may not be set, in which case it could cause issues
for zsh modules.

This change was prompted by issue #1331.

Also when creating a missing TMPDIR, use mkdir --mode=700 instead
of creating the directory and then chmoding it afterward.
2017-06-26 14:58:37 -07:00
Alexander Neumann 2f20a80f72 sorin theme: Use a proper temp file for async data 2017-06-13 10:36:35 -07:00
Alexander Neumann 5bcc223e95 zprofile: Use non-random static TMPDIR
Closes #1319
2017-06-13 10:36:35 -07:00
Jared Scott 3a6ae0fc6c Change $TMPDIR for non-interactive shells
This commit changes the way $TMPDIR is set by using `mktemp` rather
than a fixed string.
2017-04-04 20:49:00 -07:00
Sorin Ionescu ab45ade380 [Fix #801] Make $TMPPREFIX a file path 2015-02-22 21:56:12 -05:00
Sorin Ionescu 88aee30ae8 [Fix #762] Use $LOGNAME instead of $USER
$USER is deprecated.
2015-02-13 00:00:27 -05:00
Indrajit Raychaudhuri 53bd555c6d Try `lesspipe` in addition to `lesspipe.sh` for LESSOPEN
Debian based systems have `lesspipe`, without '.sh' suffix.
Since `$commands` is an associative array, we do index search and set
the input preprocessor on first match.
2014-10-10 19:00:46 -04:00
Sorin Ionescu a84ac5b002 Only one newline at end of file 2014-10-09 23:38:15 -04:00
Sorin Ionescu 76fc07ba9f Comment a typeset 2013-11-25 18:16:36 -05:00
Robin 3a5fff9c6d Don't override customized environments in subshells
Only set up environment for the top-level shell, and allow it to be
inherited normally.

A top level shell is usually a login shell, but can also be a
non-interactive, non-login shell in certain cases, such as when
executing an SSH remote command.

Signed-off-by: Sorin Ionescu <sorin.ionescu@gmail.com>
2013-11-25 17:16:33 -05:00
Sorin Ionescu df82640caa Rename templates to runcoms 2012-08-04 14:55:38 -04:00