For some weird reason we only used $editor if it wasn't empty, but
then failed to fail if it was.
This will now print an error and use fish, just like if the $EDITOR
value is invalid in any other way.
Fixes#5257.
* Check whether tmp file was modified in `funced`
* More idiomatic error messages
* Store the checksum in a local variable
* MD5 function supporting both GNU and BSD
* Use `else if` in MD5 function
* Use `string` builtin instead of `cut`
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
Fix for CVE-2014-2906.
Closes a race condition in funced which would allow execution of
arbitrary code; closes a race condition in psub which would allow
alternation of the data stream.
Note that `psub -f` does not work (#1040); a fix should be committed
separately for ease of maintenance.
Closes#1437
* case no properly handles -h and --help flags, i.e. treats it as
pattern
* fixed case escaping:
The following expressions now work correctly:
switch '*'
echo '*'
echo Match any string
end
switch '*'
echo '\*'
echo Match asterix
end
switch '\\'
echo '\\\\'
echo Match slash
end
The same for '?' sign
* Editor mode is no the default
* Use -i or --interactive or -e fish to edit function in interactive
mode
* tmpname is now created with random number added and check that file
do not already exist
* check $TMPDIR existence and put /tmp if it does not exist
* There is an undocumented feature to use functions, started with dash.
Introduce necessary changes to funced, functions, def_function()
in order to make it work properly.
* Delete editor guessing. Use $EDITOR variable or -e key