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

fix(bash): work around custom IFS #1514

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Commits on Jan 6, 2024

  1. fix(bash): work around custom IFS

    When the user sets a custom value of IFS, the up keybinding may fail
    because the option `--shell-up-key-binding` passed to
    `__atuin_history` is broken by the word splitting of the shell.  For
    example, when the user sets IFS=-, `atuin` called from __atuin_history
    receives `shell up key binding <content>` as the search string.
    
    $ IFS=-
    $ echo [up] # <-- this does not work as expected
    
    Note that the problem only happens with the plain Bash without ble.sh.
    The problem does not arise within ble.sh because ble.sh separates the
    user environment and the line-editor environment by saving/restoring
    the shell settings.  The keybindings are processed in the line-editor
    environment, so the custom IFS set by the user does not affect it.
    
    In this patch, we properly quote the arguments to the atuin command.
    akinomyoga committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    8cee11c View commit details
    Browse the repository at this point in the history