mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
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
This commit is contained in:
10
builtin.cpp
10
builtin.cpp
@@ -1097,7 +1097,9 @@ static void functions_def( const wcstring &name, wcstring &out )
|
||||
event_get( &search, &ev );
|
||||
|
||||
out.append(L"function ");
|
||||
out.append(name);
|
||||
if ( name[0]!=L'-' ){
|
||||
out.append(name);
|
||||
}
|
||||
|
||||
if (! desc.empty())
|
||||
{
|
||||
@@ -1165,7 +1167,11 @@ static void functions_def( const wcstring &name, wcstring &out )
|
||||
append_format( out, L" %ls", named.at(i).c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( name[0]==L'-' ){
|
||||
out.append(L" -- ");
|
||||
out.append(name);
|
||||
}
|
||||
|
||||
/* This forced tab is sort of crummy - not all functions start with a tab */
|
||||
append_format( out, L"\n\t%ls", def.c_str());
|
||||
|
||||
Reference in New Issue
Block a user