about summary refs log tree commit diff stats
path: root/apps/sigils
Commit message (Expand)AuthorAgeFilesLines
...
* 5602Kartik Agaram2019-09-011-0/+0
* 5600Kartik Agaram2019-08-311-0/+0
* 5599 - sigils: support metadata in %reg and *regKartik Agaram2019-08-311-0/+0
* 5595 - support ebp and esp in sigilsKartik Agaram2019-08-311-0/+0
* 5594 - rename 'desugar' to 'sigils'Kartik Agaram2019-08-311-0/+0
f='/akspecs/aerc/blame/commands/pwd.go?h=0.6.0&id=248345d875e958b70f48797bfe6e822cc9485eb8'>^
2a09617 ^


6838c23 ^
2a09617 ^


6838c23 ^
2a09617 ^
588a6c7 ^

6838c23 ^
588a6c7 ^






76a9181 ^
588a6c7 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35




                
              



                                          

                          
             


                                
                                        


                              
                                                                          
                  

 
                                                                      






                                               
                                            

                  
package commands

import (
	"errors"
	"os"
	"time"

	"git.sr.ht/~sircmpwn/aerc/widgets"
)

type PrintWorkDir struct{}

func init() {
	register(PrintWorkDir{})
}

func (PrintWorkDir) Aliases() []string {
	return []string{"pwd"}
}

func (PrintWorkDir) Complete(aerc *widgets.Aerc, args []string) []string {
	return nil
}

func (PrintWorkDir) Execute(aerc *widgets.Aerc, args []string) error {
	if len(args) != 1 {
		return errors.New("Usage: pwd")
	}
	pwd, err := os.Getwd()
	if err != nil {
		return err
	}
	aerc.PushStatus(pwd, 10*time.Second)
	return nil
}