2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-21 21:13:22 +00:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Nadiyar
cdf58635b3
Merge 16d08d446f10ee47b5cfc8ab68ce888a17d1e2f2 into 4743222044d5e1961ce089b0d4a602005519bce3 2024-12-29 08:24:21 +00:00
Nadiyar
16d08d446f
Merge branch 'master' into patch-1 2024-12-29 11:54:18 +03:30
Nadiyar
97b38465a1
docs: remove extra space
Co-authored-by: sammy <torchedsammy@gmail.com>
2024-12-29 11:45:22 +03:30
Nadiyar
8c85653d72
docs: add new line
Co-authored-by: sammy <torchedsammy@gmail.com>
2024-12-29 11:44:51 +03:30
4743222044
chore: forward master in sync to v2.3.4 2024-12-28 19:58:00 -04:00
14a600f922
chore: bump version related things 2024-12-28 19:56:17 -04:00
13e6d180f8
fix: use global env variables when executing 2024-12-28 19:53:26 -04:00
CelestialCrafter
836f941e16
fix: handle completion info check error (#330)
* fix: handle completion info check error
fixes Rosettea/Hilbish#329

* make changelog more descriptive
2024-12-28 19:53:19 -04:00
a02cd1d7ef
fix: use global env variables when executing 2024-12-28 19:50:06 -04:00
c969f5ed15
feat: complete hint text on right arrow (#328) 2024-12-22 12:09:57 -04:00
6 changed files with 22 additions and 24 deletions

View File

@ -1,11 +1,16 @@
# 🎀 Changelog # 🎀 Changelog
## Unreleased ## Unreleased
### Fixed ### Added
- Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else) - Forward/Right arrow key will fill in hint text (#327)
### Changed ### Changed
- Documentation for Lunacolors has been improved, with more information added. - Documentation for Lunacolors has been improved, with more information added.
## [2.3.4] - 2024-12-28
### Fixed
- Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else)
- Apply environment variables properly after 2.3 shell interpreter changes
## [2.3.3] - 2024-11-04 ## [2.3.3] - 2024-11-04
### Fixed ### Fixed
- Heredocs having issues - Heredocs having issues
@ -786,6 +791,7 @@ This input for example will prompt for more input to complete:
First "stable" release of Hilbish. First "stable" release of Hilbish.
[2.3.4]: https://github.com/Rosettea/Hilbish/compare/v2.3.3...v2.3.4
[2.3.3]: https://github.com/Rosettea/Hilbish/compare/v2.3.2...v2.3.3 [2.3.3]: https://github.com/Rosettea/Hilbish/compare/v2.3.2...v2.3.3
[2.3.2]: https://github.com/Rosettea/Hilbish/compare/v2.3.1...v2.3.2 [2.3.2]: https://github.com/Rosettea/Hilbish/compare/v2.3.1...v2.3.2
[2.3.1]: https://github.com/Rosettea/Hilbish/compare/v2.3.0...v2.3.1 [2.3.1]: https://github.com/Rosettea/Hilbish/compare/v2.3.0...v2.3.1

View File

@ -29,7 +29,7 @@ Colors:
- cyan - cyan
- white - white
Styles: Styles:
- reset - reset
- bold - bold
- dim - dim
@ -40,5 +40,5 @@ Styles:
For the colors, there are background and bright variants. Background color For the colors, there are background and bright variants. Background color
variants have a `Bg` suffix, while bright variants use the `bright` prefix. variants have a `Bg` suffix, while bright variants use the `bright` prefix.
These can also be combined. Note that appropriate camel casing must be applied. These can also be combined. Note that appropriate camel casing must be applied.
For example, bright blue would be written as `brightBlue`, a cyan background as For example, bright blue would be written as `brightBlue`, a cyan background as
`cyanBg`, and combining them would result in `brightBlueBg`. `cyanBg`, and combining them would result in `brightBlueBg`.

20
exec.go
View File

@ -434,26 +434,8 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
// sh/interp but with our job handling // sh/interp but with our job handling
env := hc.Env env := hc.Env
envList := make([]string, 0, 64) envList := os.Environ()
env.Each(func(name string, vr expand.Variable) bool { env.Each(func(name string, vr expand.Variable) bool {
if name == "PATH" {
pathEnv := os.Getenv("PATH")
envList = append(envList, "PATH="+pathEnv)
return true
}
if !vr.IsSet() {
// If a variable is set globally but unset in the
// runner, we need to ensure it's not part of the final
// list. Seems like zeroing the element is enough.
// This is a linear search, but this scenario should be
// rare, and the number of variables shouldn't be large.
for i, kv := range envList {
if strings.HasPrefix(kv, name+"=") {
envList[i] = ""
}
}
}
if vr.Exported && vr.Kind == expand.String { if vr.Exported && vr.Kind == expand.String {
envList = append(envList, name+"="+vr.String()) envList = append(envList, name+"="+vr.String())
} }

View File

@ -56,3 +56,10 @@ func (rl *Instance) resetHintText() {
//rl.hintY = 0 //rl.hintY = 0
rl.hintText = []rune{} rl.hintText = []rune{}
} }
func (rl *Instance) insertHintText() {
if len(rl.hintText) != 0 {
// fill in hint text
rl.insert(rl.hintText)
}
}

View File

@ -707,6 +707,9 @@ func (rl *Instance) escapeSeq(r []rune) {
rl.renderHelpers() rl.renderHelpers()
return return
} }
rl.insertHintText()
if (rl.modeViMode == VimInsert && rl.pos < len(rl.line)) || if (rl.modeViMode == VimInsert && rl.pos < len(rl.line)) ||
(rl.modeViMode != VimInsert && rl.pos < len(rl.line)-1) { (rl.modeViMode != VimInsert && rl.pos < len(rl.line)-1) {
rl.moveCursorByAdjust(1) rl.moveCursorByAdjust(1)

View File

@ -11,7 +11,7 @@ var (
// Version info // Version info
var ( var (
ver = "v2.3.3" ver = "v2.3.4"
releaseName = "Alyssum" releaseName = "Alyssum"
gitCommit string gitCommit string