inv-alias now uses the absolute path for regions
This commit is contained in:
parent
e652c1e1c5
commit
566a9fecec
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user