Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command lookup from .zsh_sessions do not correctly get selected. #760

Open
kaovilai opened this issue Oct 9, 2024 · 0 comments
Open

command lookup from .zsh_sessions do not correctly get selected. #760

kaovilai opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kaovilai
Copy link

kaovilai commented Oct 9, 2024

Environment

% typeset -p1 VENDOR OSTYPE ZSH_PATCHLEVEL _autocomplete__funcfiletrace
typeset VENDOR=apple
typeset OSTYPE=darwin23.0.0
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset -a _autocomplete__funcfiletrace=(
  /Users/tiger/git/zsh-snap/functions/.znap.source:23
  /Users/tiger/git/zsh-snap/functions/.znap.source:26
  /Users/tiger/git/zsh-snap/functions/znap:42
  /Users/tiger/git/dotfiles/zsh/znap.zsh:17
  /Users/tiger/.zshrc:28
  zsh:0
)

% git -C ~autocomplete log --oneline -n1
zsh: no such user or named directory: autocomplete
  • Operating system:
❯ sw_vers
ProductName:		macOS
ProductVersion:		14.7
BuildVersion:		23H124
  • Terminal emulator: Terminal.app

Steps to reproduce

Cmd+R then type
see video https://github.com/user-attachments/assets/646c8377-24d0-4e1a-8e97-28008a2384e4

When using arrow keys to get one of the last suggestions like -73 85 code ~/git/release, the command to be executed doesn't match. in this case code gcaf

❯ code gcaf 
  726  code ~/git/kubevirt-velero-plugin                                                                                                                                                                                                                                                                        
-819   43  code ./Users/tiger/go/pkg/mod/github.com/blackpiglet/[email protected]/                                                                                                                                                                                              
-812   44  code /Users/tiger/go/pkg/mod/github.com/blackpiglet/[email protected]/                                                                                                                                                                                               
-73   85  code ~/git/release   

From digging some of these, everything with - appears to be coming from .zsh_sessions.

Anything from .zsh_history works fine.

Contents of ~autocomplete-log/YYYY-MM-DD.log (click to expand)

@kaovilai kaovilai added the bug Something isn't working label Oct 9, 2024
@kaovilai kaovilai changed the title history lookup can sometimes show -<number> <> command lookup from .zsh_sessions do not correctly get selected. Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant