![](https://seccdn.libravatar.org/avatar/128a7b98d536a9cf9b4d4d5a90d63475.jpg?s=120&d=mm&r=g)
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mcfly for openSUSE:Factory checked in at 2024-06-03 17:44:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mcfly (Old) and /work/SRC/openSUSE:Factory/.mcfly.new.24587 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mcfly" Mon Jun 3 17:44:21 2024 rev:8 rq:1178226 version:0.9.0+0 Changes: -------- --- /work/SRC/openSUSE:Factory/mcfly/mcfly.changes 2024-05-20 18:16:15.904463622 +0200 +++ /work/SRC/openSUSE:Factory/.mcfly.new.24587/mcfly.changes 2024-06-03 17:44:32.073392875 +0200 @@ -1,0 +2,6 @@ +Mon Jun 3 06:27:57 UTC 2024 - Michael Vetter <mvetter@suse.com> + +- Update to 0.9.0: + * Make bash no longer use TIOCSTI by default + +------------------------------------------------------------------- Old: ---- mcfly-0.8.6+0.tar.xz New: ---- mcfly-0.9.0+0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mcfly.spec ++++++ --- /var/tmp/diff_new_pack.bIqu1X/_old 2024-06-03 17:44:43.845825120 +0200 +++ /var/tmp/diff_new_pack.bIqu1X/_new 2024-06-03 17:44:43.849825267 +0200 @@ -17,7 +17,7 @@ Name: mcfly -Version: 0.8.6+0 +Version: 0.9.0+0 Release: 0 Summary: Shell history helper License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.bIqu1X/_old 2024-06-03 17:44:43.881826442 +0200 +++ /var/tmp/diff_new_pack.bIqu1X/_new 2024-06-03 17:44:43.885826588 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/cantino/mcfly.git</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="scm">git</param> - <param name="revision">v0.8.6</param> + <param name="revision">v0.9.0</param> <param name="match-tag">*</param> <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param> <param name="versionrewrite-replacement">\1</param> ++++++ mcfly-0.8.6+0.tar.xz -> mcfly-0.9.0+0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/CHANGELOG.txt new/mcfly-0.9.0+0/CHANGELOG.txt --- old/mcfly-0.8.6+0/CHANGELOG.txt 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/CHANGELOG.txt 2024-06-01 05:48:37.000000000 +0200 @@ -1,3 +1,6 @@ +0.9.0 - May 31, 2024 + - Make bash no longer use TIOCSTI by default (thanks @jtschuster) + 0.8.6 - May 18, 2024 - Add windows asset generation (thanks @jtschuster) - Fix init issue for fish (thanks @4t8dd) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/Cargo.lock new/mcfly-0.9.0+0/Cargo.lock --- old/mcfly-0.8.6+0/Cargo.lock 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/Cargo.lock 2024-06-01 05:48:37.000000000 +0200 @@ -99,9 +99,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -178,9 +178,9 @@ [[package]] name = "cc" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" [[package]] name = "cfg-if" @@ -241,9 +241,9 @@ checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck", - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -373,9 +373,9 @@ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -401,9 +401,9 @@ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crossterm" @@ -848,7 +848,7 @@ [[package]] name = "mcfly" -version = "0.8.6" +version = "0.9.0" dependencies = [ "autopilot", "chrono", @@ -989,9 +989,9 @@ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1063,9 +1063,9 @@ dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1114,9 +1114,9 @@ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] @@ -1136,7 +1136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", ] [[package]] @@ -1335,22 +1335,22 @@ [[package]] name = "serde" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1448,11 +1448,11 @@ [[package]] name = "syn" -version = "2.0.64" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", "unicode-ident", ] @@ -1472,9 +1472,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] [[package]] @@ -1611,9 +1611,9 @@ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -1633,9 +1633,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1818,9 +1818,9 @@ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" dependencies = [ "memchr", ] @@ -1859,7 +1859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ - "proc-macro2 1.0.82", + "proc-macro2 1.0.84", "quote 1.0.36", - "syn 2.0.64", + "syn 2.0.66", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/Cargo.toml new/mcfly-0.9.0+0/Cargo.toml --- old/mcfly-0.8.6+0/Cargo.toml 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/Cargo.toml 2024-06-01 05:48:37.000000000 +0200 @@ -1,6 +1,6 @@ [package] name = "mcfly" -version = "0.8.6" +version = "0.9.0" authors = ["Andrew Cantino <cantino@users.noreply.github.com>"] edition = "2021" description = "McFly replaces your default ctrl-r shell history search with an intelligent search engine that takes into account your working directory and the context of recently executed commands. McFly's suggestions are prioritized in real time with a small neural network." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/README.md new/mcfly-0.9.0+0/README.md --- old/mcfly-0.8.6+0/README.md 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/README.md 2024-06-01 05:48:37.000000000 +0200 @@ -443,6 +443,10 @@ If you have a very large history database and you notice that McFly launches slowly, you can set `MCFLY_HISTORY_LIMIT` to something like 10000 to limit how many records are considered when searching. In this example, McFly would search only the latest 10,000 entries. +### Bash TIOCSTI + +Starting with Linux kernel version 6.2, some systems have disabled TIOCSTI (which McFly previously used to write the selected command). McFly works around this issue by using two "dummy" keybindings, which default to `Meta+1` and `Meta+2`. If you are using either of these for another purpose, you can set the `MCFLY_BASH_SEARCH_KEYBINDING` and `MCFLY_BASH_ACCEPT_LINE_KEYBINDING`, respectively, to something you are not using. If you would prefer to use the legacy TIOCSTI behavior, you can enable it by setting the `sysctl` variable `dev.tty.legacy_tiocsti` to `1` on your system and set the `MCFLY_BASH_USE_TIOCSTI` bash variable to `1`. + ## HISTTIMEFORMAT McFly currently doesn't parse or use `HISTTIMEFORMAT`. @@ -471,7 +475,7 @@ 1. Edit `Cargo.toml` and bump the version. 1. Edit CHANGELOG.txt 1. Run `cargo clippy` and `cargo fmt`. -1. Recompile (`cargo build`). +1. Recompile (`cargo build`) and test (`cargo test`) 1. `git add -p` 1. `git ci -m 'Bumping to vx.x.x'` 1. `git tag vx.x.x` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/mcfly.bash new/mcfly-0.9.0+0/mcfly.bash --- old/mcfly-0.8.6+0/mcfly.bash 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/mcfly.bash 2024-06-01 05:48:37.000000000 +0200 @@ -7,6 +7,8 @@ # Setup MCFLY_HISTFILE and make sure it exists. export MCFLY_HISTFILE="${HISTFILE:-$HOME/.bash_history}" + export MCFLY_BASH_SEARCH_KEYBINDING=${MCFLY_BASH_SEARCH_KEYBINDING:-"\M-1"} + export MCFLY_BASH_ACCEPT_LINE_KEYBINDING=${MCFLY_BASH_ACCEPT_LINE_KEYBINDING:-"\M-2"} if [[ ! -r "${MCFLY_HISTFILE}" ]]; then echo "McFly: ${MCFLY_HISTFILE} does not exist or is not readable. Please fix this or set HISTFILE to something else before using McFly." return 1 @@ -52,6 +54,37 @@ return ${exit_code} # Restore the original exit code by returning it. } + # Runs mcfly search with output to file, reads the output, and sets READLINE_LINE to the command. + # If the command is to be run, binds the MCFLY_KEYSTROKE2 to accept-line, otherwise binds it to nothing. + function mcfly_search { + # Get a temp file name but don't create the file - mcfly will create the file for us. + MCFLY_OUTPUT=$(mktemp --dry-run ${TMPDIR:-/tmp}/mcfly.output.XXXXXXXX) + echo \#mcfly: ${READLINE_LINE[@]} >> $MCFLY_HISTORY + mcfly search -o $MCFLY_OUTPUT + # If the file doesn't exist, nothing was selected from mcfly, exit without binding accept-line + if [[ ! -f $MCFLY_OUTPUT ]]; + then + bind "\"$MCFLY_BASH_ACCEPT_LINE_KEYBINDING\":\"\"" + return + fi; + # Get the command and set the bash text to it, and move the cursor to the end of the line. + MCFLY_COMMAND=$(awk 'NR==2{$1=a; print substr($0, 2)}' $MCFLY_OUTPUT) + READLINE_LINE=$MCFLY_COMMAND + READLINE_POINT=${#READLINE_LINE} + + # Get the mode and bind the accept-line key if the mode is run. + MCFLY_MODE=$(awk 'NR==1{$1=a; print substr($0, 2)}' $MCFLY_OUTPUT) + if [[ $MCFLY_MODE == "run" ]]; + then + bind "\"$MCFLY_BASH_ACCEPT_LINE_KEYBINDING\":accept-line" + else + bind "\"$MCFLY_BASH_ACCEPT_LINE_KEYBINDING\":\"\"" + fi; + + rm -f $MCFLY_OUTPUT + return $LAST_EXIT_CODE + } + # Set $PROMPT_COMMAND run mcfly_prompt_command, preserving any existing $PROMPT_COMMAND. if [ -z "$PROMPT_COMMAND" ] then @@ -65,7 +98,13 @@ if [[ $- =~ .*i.* ]]; then if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then # shellcheck disable=SC2016 - bind -x '"\C-r": "echo \#mcfly: ${READLINE_LINE[@]} >> $MCFLY_HISTORY ; READLINE_LINE= ; mcfly search"' + if [[ $MCFLY_BASH_USE_TIOCSTI = 1 ]]; then + bind -x '"\C-r": "echo \#mcfly: ${READLINE_LINE[@]} >> $MCFLY_HISTORY ; READLINE_LINE= ; mcfly search"' + else + # Bind ctrl+r to 2 keystrokes, the first one is used to search in McFly, the second one is used to run the command (if mcfly_search binds it to accept-line). + bind -x "\"$MCFLY_BASH_SEARCH_KEYBINDING\":\"mcfly_search\"" + bind "\"\C-r\":\"$MCFLY_BASH_SEARCH_KEYBINDING$MCFLY_BASH_ACCEPT_LINE_KEYBINDING\"" + fi else # The logic here is: # 1. Jump to the beginning of the edit buffer, add 'mcfly: ', and comment out the current line. We comment out the line diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mcfly-0.8.6+0/pkg/brew/mcfly.rb new/mcfly-0.9.0+0/pkg/brew/mcfly.rb --- old/mcfly-0.8.6+0/pkg/brew/mcfly.rb 2024-05-19 06:27:36.000000000 +0200 +++ new/mcfly-0.9.0+0/pkg/brew/mcfly.rb 2024-06-01 05:48:37.000000000 +0200 @@ -7,16 +7,17 @@ # brew untap cantino/mcfly class Mcfly < Formula - version 'v0.8.5' + version 'v0.8.6' + deprecate! date: "2024-05-18", because: "is now in the core homebrew repository and you don't need this tap" desc "McFly" homepage "https://github.com/cantino/mcfly" if OS.mac? url "https://github.com/cantino/mcfly/releases/download/#{version}/mcfly-#{version}-x86_64-apple-darwin.tar.gz" - sha256 "9c955931d72bb1e64ac4acf8a5b7020c8e89ab38afd913ac5a4f09de200b767f" + sha256 "2863068a9800d8b71965c0ddadeefef88aad1e5c5cec6757ade741251fec348b" elsif OS.linux? url "https://github.com/cantino/mcfly/releases/download/#{version}/mcfly-#{version}-x86_64-unknown-linux-musl.tar.gz" - sha256 "a0d1328e0bcbb27833a196fb6db4d34f53fba4a3352f6500d2068014cc94180a" + sha256 "b8241970861b080807807b546bc7ac4905a5b64ae6cb56b8b69657e2e26c2c6f" end def install ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/mcfly/vendor.tar.xz /work/SRC/openSUSE:Factory/.mcfly.new.24587/vendor.tar.xz differ: char 15, line 1
participants (1)
-
Source-Sync