()
| 712 | } |
| 713 | |
| 714 | func (nav *nav) exportFiles() { |
| 715 | var currFile string |
| 716 | if curr := nav.currFile(); curr != nil { |
| 717 | currFile = quoteString(curr.path) |
| 718 | } |
| 719 | |
| 720 | var selections []string |
| 721 | for _, selection := range nav.currSelections() { |
| 722 | selections = append(selections, quoteString(selection)) |
| 723 | } |
| 724 | currSelections := strings.Join(selections, gOpts.filesep) |
| 725 | |
| 726 | var vSelections []string |
| 727 | for _, selection := range nav.currDir().visualSelections() { |
| 728 | vSelections = append(vSelections, quoteString(selection)) |
| 729 | } |
| 730 | currVSelections := strings.Join(vSelections, gOpts.filesep) |
| 731 | |
| 732 | os.Setenv("f", currFile) |
| 733 | os.Setenv("fs", currSelections) |
| 734 | os.Setenv("fv", currVSelections) |
| 735 | os.Setenv("PWD", quoteString(nav.currDir().path)) |
| 736 | |
| 737 | if len(selections) == 0 { |
| 738 | os.Setenv("fx", currFile) |
| 739 | } else { |
| 740 | os.Setenv("fx", currSelections) |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | func (nav *nav) preloadLoop(ui *ui) { |
| 745 | stack := []string{} |
no test coverage detected