inv-alias now uses the absolute path for regions
This commit is contained in:
		| @@ -8,6 +8,7 @@ import ( | ||||
| 	"io/ioutil" | ||||
| 	"log" | ||||
| 	"os" | ||||
| 	"path/filepath" | ||||
| 	"regexp" | ||||
| 	"strings" | ||||
| ) | ||||
| @@ -131,11 +132,17 @@ func main() { | ||||
| 		os.Exit(1) | ||||
| 	} | ||||
|  | ||||
| 	p, err := filepath.Abs(os.Args[2]) | ||||
| 	if err != nil { | ||||
| 		fmt.Println(err) | ||||
| 		os.Exit(1) | ||||
| 	} | ||||
|  | ||||
| 	switch os.Args[1] { | ||||
| 	case "add": | ||||
| 		AddAliases(os.Args[2]) | ||||
| 		AddAliases(p) | ||||
| 	case "rm": | ||||
| 		RemoveAliases(os.Args[2]) | ||||
| 		RemoveAliases(p) | ||||
| 	default: | ||||
| 		fmt.Println(u) | ||||
| 		os.Exit(1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user