Commit graph

19 commits

Author SHA1 Message Date
ridiculousfish
15e095233b Allow funced to retry on error
Fixes #1371
2014-10-17 11:50:09 -07:00
Kevin Ballard
533496e43a Adopt the new type -q flag in the other functions 2014-07-13 19:11:29 -07:00
David Adam
55bc4168bf use mktemp(1) to generate temporary file names
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
2014-04-28 10:42:00 +08:00
ridiculousfish
825a7311ea Make funced properly handle an invalid number of arguments
Fixes https://github.com/fish-shell/fish-shell/issues/780
2013-06-08 20:29:38 -07:00
ridiculousfish
27e71c5f37 Fix funced to stop outputing an error if no EDITOR is set 2013-01-27 13:14:24 -08:00
ridiculousfish
5e9ca72731 Break up $EDITOR before passing it to type to allow it to contain flags
More work on https://github.com/fish-shell/fish-shell/issues/541
2013-01-23 18:24:49 -08:00
ridiculousfish
debfc0f712 Allow $EDITOR to be an array. Fixes https://github.com/fish-shell/fish-shell/issues/541 2013-01-23 17:14:22 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
Siteshwar Vashisht
32d2d0f0d0 Minor refactoring and fixed a bug in history function 2012-07-24 04:35:37 +05:30
maxfl
ea4b37d5c5 Fixed case behaviour
* 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
2012-07-05 14:17:25 -07:00
maxfl
fe26284376 Doc is updated
btw. funced completion is updated
2012-07-01 14:20:43 -07:00
maxfl
ab62fe6496 Update funced
* 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
2012-07-01 14:20:43 -07:00
ridiculousfish
a8bae31939 Change funced script to default to using $EDITOR if set, and to allow -e to specify a particular editor (with fish meaning the builtin editor) 2012-06-29 18:35:26 -07:00
maxfl
faea588fb8 Support editing functions starting with dot 2012-06-29 16:42:34 -07:00
maxfl
792e246262 Add emacs to 'funced -e'
The order is also changed.
2012-06-29 16:42:34 -07:00
maxfl
85f19f9b8c Add -e option to funced
New option -e or --editor allows to edit function inside external
editor, rather than in reader.
2012-06-29 16:42:34 -07:00
Grissiom
70322077d2 remove trialing spaces #2 2010-09-18 10:18:26 +08:00
liljencrantz
8c4770a26c Add boilerplate definition when using funced on undefined function
darcs-hash:20070921142954-75c98-752f389dfe4022ea3e72092bb717a60314408d41.gz
2007-09-22 00:29:54 +10:00
axel
dd48de068d Add funced function, which works like vared, but with functions
darcs-hash:20070422185539-ac50b-9080fb745cec45609e7e29971b55b96e073806e6.gz
2007-04-23 04:55:39 +10:00