aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.h
Commit message (Collapse)AuthorAge
* Add new `functions` flag -V/--inherit-variableGravatar Kevin Ballard2014-10-02
| | | | | | | | | | --inherit-variable takes a variable name and snapshots its current value. When the function is executed, it will have a local variable with this value already defined. Printing the function source will include synthesized `set -l` lines for the values. This is primarily useful for functions that are created on the fly, such as in `psub`.
* set: Print an error when setting `umask` to a bad valueGravatar Kevin Ballard2014-08-21
| | | | | | | | | Repurpose the ENV_INVALID return value for env_set(), which wasn't currently used by anything. When a bad value is passed for the 'umask' key, return ENV_INVALID to signal this and print a good error message from the `set` builtin. This makes `set umask foo` properly produce an error.
* Turn the 'mode' parameter of environment variables into an enumGravatar ridiculousfish2014-07-13
|
* Change how we separate toplevel and global scopesGravatar Kevin Ballard2014-07-13
| | | | | | | | | | | | Instead of introducing a new local scope at the point of `set`, merely push a new local scope at the end of env_init(). This means we have a single toplevel local scope across the lifetime of the fish process, which means that set -l foo bar echo $foo behaves as expected, without modifying the global environment.
* Add an optional mode to env_get_string()Gravatar Kevin Ballard2014-07-12
| | | | | | | | The mode restricts the scope in which the variable is searched for. Use this new restricted scope functionality in the `set` builtin. This fixes `set -g` to not show local shadowing variable values, and also allows for scoped erasing of slices.
* set: Print an error when setting a special var in the wrong scopeGravatar Kevin Ballard2014-07-12
| | | | | | | | | When attempting to set a readonly or electric variable in the local or universal scopes, print an appropriate error. Similarly, print an error when setting an electric variable as exported. In most cases this is simply a nicer error instead of the 'read-only' one, but for the 'umask' variable it prevents `set -l umask 0023` from silently changing the global value.
* set: Don't treat toplevel scope the same as globalGravatar Kevin Ballard2014-07-12
| | | | | | | | | | | When using the `set` command with the -l flag, if we're at the top level, create a temporary local scope. This makes query/assignment behavior be consistent with the value-printing behavior. This works by marking the current block as needing to pop the environment if a local scope was pushed. I assume this is safe to do. I also assume the current block is the right one to modify, rather than trying to walk up the stack to the root.
* Migrate global functions out of env_universal. Have env operate directlyGravatar ridiculousfish2014-06-15
| | | | on an env_universal_t.
* Migrate universal variables to env_var_t structure. EncapsulateGravatar ridiculousfish2014-04-25
| | | | universal variable storage into a class for better testability.
* Rely on $PWD instead of getcwd() more oftenGravatar ridiculousfish2013-04-27
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/696
* Cleanup and simplify null_terminated_array_t and its clientsGravatar ridiculousfish2013-02-22
|
* Large set of changes to how PATH is handled. Changed fish to no longer ↵Gravatar ridiculousfish2013-02-19
| | | | | | modify PATH in share/config.fish. Introduced variable fish_user_paths, and a glue function __fish_reconstruct_path that splices together PATH with fish_user_paths. Changed fish to no longer validate changes to PATH unless the paths are new (i.e. don't recheck what's already there). Modified certain sets to store const wchar_t instead of wcstring to save a few allocations. https://github.com/fish-shell/fish-shell/issues/527
* Clean up env_var_table_t. Switch from storing var_uni_entry_t* to ↵Gravatar ridiculousfish2013-02-11
| | | | var_uni_entry_t. Various other cleanups.
* Rearrange some variables for possibly better alignment. int -> boolGravatar ridiculousfish2013-01-19
|
* Big cleanup of env_set. Changed var_table_t to use direct var_entry_t ↵Gravatar ridiculousfish2013-01-19
| | | | instead of pointers. Changed some ints to bools.
* Apply new indentation, brace, and whitespace styleGravatar ridiculousfish2012-11-18
|
* Remove trailing whitespaces and change tabs to spacesGravatar Łukasz Niemier2012-11-18
|
* Adopt posix_spawn (!)Gravatar ridiculousfish2012-08-15
| | | | | Rewrite IO chains to be a vector of pointers, instead of a linked list Removed io_transmogrify
* Lots of miscellaneous cleanup. Unified the path_get_cd_path, ↵Gravatar ridiculousfish2012-07-20
| | | | path_allocate_cd_path, etc. functions
* Renamed env_vars to env_vars_snapshot_tGravatar ridiculousfish2012-07-20
| | | | Cleanup of non-wcstring version of path_get_path
* Changes to make fish use the relocated fishd instead of the installed one, ↵Gravatar ridiculousfish2012-07-18
| | | | if it exists
* Adopt wcstring in env_setGravatar ridiculousfish2012-05-09
|
* Improved fork reportingGravatar ridiculousfish2012-04-21
| | | | Made autosuggestion work properly for tilde expansion
* Move special handling of DISPLAY environment variable from etc/config.fish ↵Gravatar ridiculousfish2012-03-06
| | | | to fish itself to reduce number of fork calls made at launch
* Notice when fish_term256 changes and react to itGravatar ridiculousfish2012-03-05
|
* More work on improving interaction between fork and pthreads. Added ↵Gravatar ridiculousfish2012-02-29
| | | | null_terminated_array_t class.
* Fix for error messages when loading completionsGravatar ridiculousfish2012-02-26
|
* More work towards autosuggesting completionsGravatar ridiculousfish2012-02-25
|
* Modified env_get_string() to accept wcstring instead of wchar_t*.Gravatar Siteshwar Vashisht2012-02-24
|
* Remove old env_get_names implementationGravatar ridiculousfish2012-02-08
|
* Work on new history implementationGravatar ridiculousfish2012-02-05
|
* Redesign new environment variables to use env_var_t instead of wcstringGravatar Peter Ammon2012-01-14
| | | | Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
* Introduce env_var_t to replace empty string as missing environment variableGravatar Peter Ammon2012-01-14
|
* Additional migration to STL data structuresGravatar ridiculousfish2012-01-10
|
* Some changes to migrate towards C++ and a multithreaded modelGravatar ridiculousfish2011-12-26
|
* remove trailing spacesGravatar Grissiom2010-09-18
| | | | | This is done by `sed -i -e 's/[ \t]*$//' *.[c,h]`, which should not introduce any functionality change.
* Fix minor bug, PWD was incorrectly set on startupGravatar liljencrantz2008-01-17
| | | | darcs-hash:20080116220738-75c98-2b7c886629857540efee8f1cab9da0aa9ed8f76d.gz
* Minor edits, remove unneeded code, add a few commants, correct spelling, ↵Gravatar axel2006-10-26
| | | | | | tweak the todo list, etc. darcs-hash:20061026102253-ac50b-eb42fdab9a9211d68386a563134856a96b870d90.gz
* Add compiler warnings for some common incorrect usage of functions, such as ↵Gravatar axel2006-10-20
| | | | | | forgetting to cast null pointers to variadic functions darcs-hash:20061019151947-ac50b-4043638a7a830fa80fd918f92365f5afe3ff208a.gz
* Minor code tweaks, mostly things like indentation, but also a ferw code ↵Gravatar axel2006-08-28
| | | | | | reorderings darcs-hash:20060828120244-ac50b-ad4be149ff245b6f799452f9eeff7bcc60af1526.gz
* Add more function input validation checksGravatar axel2006-06-09
| | | | darcs-hash:20060608235212-ac50b-25fd55f96356af65d4da1eec100cc954b4a9f81e.gz
* Make it possible to specify scope of a variable to be erased or tested. Also ↵Gravatar axel2006-06-05
| | | | | | make sure set exits with a non-zero exit status when erasing fails. darcs-hash:20060604201451-ac50b-4ea0212c513b33be40559dfe8d65c1446c53f682.gz
* Add warning when trying to change read-only variableGravatar axel2006-04-11
| | | | darcs-hash:20060410153626-ac50b-700ff7687647b8aab47ba79d759d1739cbe60425.gz
* Increase fish robustness by improving signal handling when forking jobs and ↵Gravatar axel2005-10-14
| | | | | | minor signal handling improvements darcs-hash:20051014114033-ac50b-8d0f6274ac590f1b6dbe82c55366f44ed7debf20.gz
* Add header guards to the header files.Gravatar James Vega2005-10-05
| | | | darcs-hash:20051004151139-35ec8-7af69b9d7647d145dc621f7eaea726e729cff554.gz
* Add support for zero element arraysGravatar axel2005-09-27
| | | | darcs-hash:20050926144703-ac50b-3ed14d14b02908862d69aec08aab35b6d0188bba.gz
* Exportable universal variablesGravatar axel2005-09-23
| | | | darcs-hash:20050922201652-ac50b-f70e7607b4ace24da4020f2d432718dc335e5bdd.gz
* Initial revisionGravatar axel2005-09-20
darcs-hash:20050920132639-ac50b-fa3b476891e1f5f67207cf4cc7bf623834cc5edc.gz