Giter Site home page Giter Site logo

environment's Introduction

environment

Sets sane Zsh built-in environment options.

Settings

If HISTFILE is not set, the history is set to be saved in ${ZDOTDIR:-${HOME}}/.zhistory. The file path can be customized with:

HISTFILE=/path/to/.zsh_history

Some Zsh installations already have a value set for HISTFILE. E.g. the /etc/zshrc file in macOS sets it to ${ZDOTDIR:-$HOME}/.zsh_history, so you'll have to set your own value in your ~/.zshrc if you want to customize it.

Zsh options

Changing directories

  • AUTO_CD performs cd to a directory if the typed command is invalid, but is a directory.
  • AUTO_PUSHD makes cd push the old directory to the directory stack.
  • CD_SILENT does not print the working directory after a cd.
  • PUSHD_IGNORE_DUPS does not push multiple copies of the same directory to the stack.
  • PUSHD_SILENT does not print the directory stack after pushd or popd.
  • PUSHD_TO_HOME has pushd without arguments act like pushd ${HOME}.

Expansion and globbing

  • EXTENDED_GLOB treats #, ~, and ^ as patterns for filename globbing.

History

  • HIST_FIND_NO_DUPS does not display duplicates when searching the history.
  • HIST_IGNORE_DUPS does not enter immediate duplicates into the history.
  • HIST_IGNORE_SPACE removes commands from the history that begin with a space.
  • HIST_VERIFY doesn't execute the command directly upon history expansion.
  • SHARE_HISTORY causes all terminals to share the same history 'session'.

Input/output

  • INTERACTIVE_COMMENTS allows comments starting with # in the shell.
  • NO_CLOBBER disallows > to overwrite existing files. Use >| or >! instead.

Job control

  • LONG_LIST_JOBS lists jobs in verbose format by default.
  • NO_BG_NICE prevents background jobs being given a lower priority.
  • NO_CHECK_JOBS prevents status report of jobs on shell exit.
  • NO_HUP prevents SIGHUP to jobs on shell exit.

environment's People

Contributors

antoineco avatar ericbn avatar eriner avatar hensansi avatar sodiumjoe avatar tuurlijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

environment's Issues

Changes to HISTSIZE and SAVEHIST caused those values to not be set anymore

Environment:

  • zsh 5.8 (x86_64-ubuntu-linux-gnu)
  • zim 1.4.3

@ericbn After the changes in 4293dd8, the following values are now exported in the environment:

$ echo $HISTSIZE $SAVEHIST
30 0

This is because the values are now only applied if variables don't currently have a value, but those two seem to always be set by Zsh. I tried starting a shell with zsh -f -il, and the same echo command returns the same two values.

Note: this seems to break the zsh-history-substring-search module, which is how I noticed something was wrong.

`.zim/modules/environment/init.zsh:setopt:16: no such option: CD_SILENT` when launching shell

  • I've checked the existing issues and I'm not duplicating a report.
  • I'm using the latest version of zimfw.
  • I've checked the Changelog and I'm not being affected by documented changes.
  • I've checked the ๐Ÿ“ข Announcements and I'm not being affected by announced changes.
  • I was able to reproduce the issue with a clean installation of Zim.
  • I've pasted the output of zimfw info below.

Describe the bug
When launching a fresh instance of Zsh, I get the message in the title. It seems to be benign and does not appear until the shell is launched again. I get the message both on my daily use Zsh setup and following the repro example below, with no additional steps to the reproduce.

Steps to reproduce
The fist 4 steps restart the shell with a clean installation of Zim in a temporary directory.
Use exec zsh when restarting the terminal or restarting the shell is needed.

  1. cd ${$(mktemp -d):A}
  2. ZDOTDIR=${PWD} HOME=${PWD} ZIM_HOME=${PWD}/.zim exec zsh
  3. curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
  4. exec zsh
  5. The message should appear

Current behavior
.zim/modules/environment/init.zsh:setopt:16: no such option: CD_SILENT when launching a fresh instance of Zsh.

Expected behavior
No warning message.

Screenshots
N/A

zimfw info
Note: I scrubbed some info from the System info section.

zimfw version: 1.6.2 (built at 2021-11-21 19:40:05 UTC, previous commit is a5fb148)
ZIM_HOME:      /home/eturkes/.zim
Zsh version:   5.6
System info:   Linux 5.3.18-59.34-default #1 SMP Thu Nov 11 12:18:45 UTC 2021 x86_64 GNU/Linux

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.