Commit Graph

13 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
1d7643751b Revert "Make funcsave update the function <-> file mapping"
This reverts commit 7f402cdae7.

There are fundamental issues with `funced` and `funcsave` that prevent
this from working. A file and a function are not interchangeable.
2020-03-20 10:18:52 -05:00
Mahmoud Al-Qudsi
7f402cdae7 Make funcsave update the function <-> file mapping
This makes `funced` after `funcsave` behave as expected rather than a
potential source of data loss.

Closes #6113.
2020-03-20 10:03:05 -05:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Fabian Homborg
3a835ebd61 Make --help work
See #5361.
2018-11-22 12:43:35 +01:00
Fabian Homborg
6c988abe28 Add $__fish_config_dir variable
Contains the path to the user config.fish (e.g. ~/.config/fish)
without having to do the `set -q XDG_CONFIG_HOME` dance.

See #5270.
2018-10-21 15:42:25 +02:00
Fabian Homborg
3b2be9009e funcsave: Use mkdir -p
It's in POSIX, and simplifies stuff.
2018-10-21 15:24:38 +02:00
Kurtis Rader
35a7db50a2 fix bug introduced by commit 86af63cd3 2017-07-25 14:02:50 -07:00
Kurtis Rader
86af63cd39 update funcsave to use argparse 2017-07-13 13:35:26 -07:00
Kurtis Rader
11a60c8374 reformat all fish scripts
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.
2016-11-27 21:27:22 -08:00
ridiculousfish
87428672d8 Fix funcsave to not delete the function it just created
In 73f344f41b, we allowed autoloaded functions to be deleted.
For some reason, funcsave immediately deletes the function it
creates. This previously did very little, since the function would
immediately be re-autoloaded, but with the fix for 73f344f41b
the function gets tombstoned. So the effect is that funcsave
makes the function disappear! This simply removes the erase call,
which dates back to fish 1.x.
2015-04-06 22:40:13 -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
Dylan Smith
fd4ac87382 funcsave: Fixed error and help handling.
Renamed references to the previous command name of save_function to
funcsave, and returned an error after printing the help text when no
arguments are specified.
2010-12-02 01:13:51 +08:00
axel
52f9560b4f Rename save_function to funcsave to keep consistency between function/variable functions
darcs-hash:20070416214453-ac50b-9ec9559fc468256dc149e92e9fece37da940ad7e.gz
2007-04-17 07:44:53 +10:00