Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Naadiyaar authored Dec 29, 2024
2 parents 97b3846 + 4743222 commit 16d08d4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# 🎀 Changelog

## Unreleased
### Fixed
- Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else)
### Added
- Forward/Right arrow key will fill in hint text (#327)
### Changed
- 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
### Fixed
- Heredocs having issues
Expand Down Expand Up @@ -786,6 +791,7 @@ This input for example will prompt for more input to complete:
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.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
Expand Down
20 changes: 1 addition & 19 deletions exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,26 +434,8 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
// sh/interp but with our job handling

env := hc.Env
envList := make([]string, 0, 64)
envList := os.Environ()
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 {
envList = append(envList, name+"="+vr.String())
}
Expand Down
7 changes: 7 additions & 0 deletions readline/hint.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ func (rl *Instance) resetHintText() {
//rl.hintY = 0
rl.hintText = []rune{}
}

func (rl *Instance) insertHintText() {
if len(rl.hintText) != 0 {
// fill in hint text
rl.insert(rl.hintText)
}
}
3 changes: 3 additions & 0 deletions readline/readline.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,9 @@ func (rl *Instance) escapeSeq(r []rune) {
rl.renderHelpers()
return
}

rl.insertHintText()

if (rl.modeViMode == VimInsert && rl.pos < len(rl.line)) ||
(rl.modeViMode != VimInsert && rl.pos < len(rl.line)-1) {
rl.moveCursorByAdjust(1)
Expand Down
2 changes: 1 addition & 1 deletion vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (

// Version info
var (
ver = "v2.3.3"
ver = "v2.3.4"
releaseName = "Alyssum"

gitCommit string
Expand Down

0 comments on commit 16d08d4

Please sign in to comment.