mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-23 01:10:23 +00:00
Merge
This commit is contained in:
commit
1013b03314
2 changed files with 9 additions and 3 deletions
|
|
@ -177,7 +177,13 @@ func (tc *termcap) setupterm(name string) error {
|
|||
if k := strings.SplitN(val, "=", 2); len(k) == 2 {
|
||||
tc.strs[k[0]] = unescape(k[1])
|
||||
} else if k := strings.SplitN(val, "#", 2); len(k) == 2 {
|
||||
if u, err := strconv.ParseUint(k[1], 10, 0); err != nil {
|
||||
if strings.HasPrefix(k[1], "0x") {
|
||||
if u, err := strconv.ParseUint(k[1][2:], 16, 0); err != nil {
|
||||
return (err)
|
||||
} else {
|
||||
tc.nums[k[0]] = int(u)
|
||||
}
|
||||
} else if u, err := strconv.ParseUint(k[1], 10, 0); err != nil {
|
||||
return (err)
|
||||
} else {
|
||||
tc.nums[k[0]] = int(u)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
filetype: shell
|
||||
|
||||
detect:
|
||||
filename: "(\\.sh$|\\.bash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)"
|
||||
header: "^#!.*/(env +)?(ba)?sh( |$)"
|
||||
filename: "(\\.sh$|\\.bash|\\.ash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|\\.profile|profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)"
|
||||
header: "^#!.*/(env +)?(ba)?(a)?sh( |$)"
|
||||
|
||||
rules:
|
||||
# Numbers
|
||||
|
|
|
|||
Loading…
Reference in a new issue