You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sack stores F somenumber in shell history instead of the actual editor command that was run. Across multiple searches these aren't the same locations. Sack functionality should be decoupled from shell history so exact locations can be revisited via shell history.
$ sack something
...
$ F 1
...
$ <press up> # this should give the actual editor command that was run and not F 1
These lines added to the sack script (at line 163 in ~/bin/sack) work in zsh.
HISTFILE=~/.zhistory # or wherever your history is
sed -i '$ d' \$HISTFILE # delete the F somenumber that was added
/bin/zsh -ic "print -s \$sack__editor +\$sack__line \"\$sack__file\"" # add actual command to the shell history
\$sack__editor +\$sack__line "\$sack__file"
If you run a sack search now, the shell history stores the actual locations visited. You might want to do fc -R in zsh.
Let me know what you think of this feature and if it could be implemented in a portable way that works across shells. Would be happy to submit a PR.
The text was updated successfully, but these errors were encountered:
sack stores
F somenumber
in shell history instead of the actual editor command that was run. Across multiple searches these aren't the same locations. Sack functionality should be decoupled from shell history so exact locations can be revisited via shell history.These lines added to the sack script (at line 163 in
~/bin/sack
) work in zsh.If you run a sack search now, the shell history stores the actual locations visited. You might want to do
fc -R
in zsh.Let me know what you think of this feature and if it could be implemented in a portable way that works across shells. Would be happy to submit a PR.
The text was updated successfully, but these errors were encountered: