bash-preexec icon indicating copy to clipboard operation
bash-preexec copied to clipboard

⚡ preexec and precmd functions for Bash just like Zsh.

Results 29 bash-preexec issues
Sort by recently updated
recently updated
newest added

It can be disabled by adding this line to the shell file: ```bash # shellcheck disable=SC2292,SC2250,SC2086,SC1087,SC2248,SC2001,SC1007,SC2034 ``` Issues can be seen by adding the script to the [shellcheck online editor](https://www.shellcheck.net/):

`bash-preexec` relies on the `DEBUG` trap (for `preexec`) and `PROMPT_COMMAND` (for `precmd`). In particular, the hook using the `DEBUG` trap is a kind of hack and fragile. The `DEBUG` trap...

*This isn't strictly a bug/FR; if you feel like enabling Discussions for this repo I can repost this as a discussion* I noticed [Bash 5.1](https://tiswww.case.edu/php/chet/bash/NEWS) allows `PROMPT_COMMAND` to be an...

Some libraries do things like `PROMPT_COMMAND="$PROMPT_COMMAND ; _new_addition"`, that's a space-semicolon-space, and others do `PROMPT_COMMAND="_other_thing; $PROMPT_COMMAND"`. This leads to two consecutive semicolons if both libraries load after bp first sets...

This PR is based on #96 and alsö accounts for if the user still sets `$HISTCONTROL` incompatibly when actually running hooks. If the user insists, then gracefully fall back to...

After 3458480385f81124a9fd9a38ff384e43dd815b1c Remove ignorespace from $HISTCONTROL and after 7e55ac15fee86cdf8e08e966d8b8c9dd2bf7ad03 Follow up commit for issue #6 -Replace ignoreboth with simpley ignoredups this script would remove 'ignorespace' and would replace 'ignoreboth' with...

See below for a test run with Bats 1.5.0 (the same run succeeds with Bats 1.4.1). Originally found in a [NixOS CI job](https://hydra.nixos.org/build/156972814/nixlog/2). This is with bash-preexec 0.4.1 but master...

As far I can see, we may avoid the DEBUG trap in version 4.4: ``` PS0 The value of this parameter is expanded (see PROMPTING below) and displayed by interactive...

I understand the current reasoning for removing `ignorespace` and `ignoreboth` but I think they break such an important expectation for users that, if set, preexec should manually cleanup history, to...

When running a pre-exec hook/function for `ls ; ls` for example, pre-exec would only occur on the first `ls` command because the 2nd iteration is considered to be "interactive while...