File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ _export()
5252 return
5353 fi
5454 local suffix=" "
55- if ! $remove ; then
55+ if ! $remove && [[ $action != function ]] ; then
5656 suffix= " ="
5757 compopt -o nospace
5858 fi
Original file line number Diff line number Diff line change 11import pytest
22
3+ from conftest import assert_bash_exec
4+
35
46class TestExport :
57 @pytest .mark .complete ("export BASH" )
@@ -34,3 +36,13 @@ def test_7(self, completion):
3436 @pytest .mark .complete ("export -" , require_cmd = True )
3537 def test_8 (self , completion ):
3638 assert completion
39+
40+ @pytest .fixture (scope = "class" )
41+ def export_f_canary (self , request , bash ):
42+ assert_bash_exec (bash , "_comp__test_export_f_canary() { return; }" )
43+
44+ @pytest .mark .complete ("export -f _comp__test_export_f_canar" )
45+ def test_no_equals_sign_for_function (self , completion , export_f_canary ):
46+ assert completion
47+ assert "=" not in "" .join (completion )
48+ assert completion .endswith (" " )
You can’t perform that action at this time.
0 commit comments