mcfly: Bump to 0.7.1

This commit is contained in:
Tee KOBAYASHI 2023-01-09 18:19:07 +09:00 committed by xtkoba
parent 254ea7ffc4
commit 8502c55f7b
3 changed files with 28 additions and 25 deletions

View File

@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/cantino/mcfly
TERMUX_PKG_DESCRIPTION="Replaces your default ctrl-r shell history search with an intelligent search engine"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.6.1"
TERMUX_PKG_VERSION=0.7.1
TERMUX_PKG_SRCURL=https://github.com/cantino/mcfly/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=e2eebca8f66ec99ff8582886a10e8dfa1a250329ac02c27855698c8d4a33a3f2
TERMUX_PKG_SHA256=75bb4e64bcfe339181baadb8adc1ec47001d3e0fb5d20c6e13ec3e071076d4dd
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
@ -28,3 +28,17 @@ termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/mcfly
install -Dm600 -t $TERMUX_PREFIX/share/mcfly mcfly.{fi,z}sh
}
termux_step_create_debscripts() {
cat <<-EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo
echo "********"
echo "McFly does not support Bash on Android."
echo
echo "https://github.com/termux/termux-packages/issues/8722"
echo "https://github.com/cantino/mcfly/issues/215"
echo "********"
echo
EOF
}

View File

@ -0,0 +1,12 @@
--- a/src/init.rs
+++ b/src/init.rs
@@ -18,8 +18,7 @@
Self {}
}
pub fn init_bash() {
- let script = include_str!("../mcfly.bash");
- print!("{}", script);
+ panic!("Bash is not supported on Android.");
}
pub fn init_zsh() {
let script = include_str!("../mcfly.zsh");

View File

@ -1,23 +0,0 @@
--- a/src/settings.rs
+++ b/src/settings.rs
@@ -238,8 +238,8 @@
.subcommand(SubCommand::with_name("init")
.about("Prints the shell code used to execute mcfly")
.arg(Arg::with_name("shell")
- .help("Shell to init — one of bash, zsh, or fish")
- .possible_values(&["bash", "zsh", "fish"])
+ .help("Shell to init — one of zsh or fish")
+ .possible_values(&["zsh", "fish"])
.required(true))
)
.get_matches();
@@ -459,9 +459,6 @@
("init", Some(init_matches)) => {
settings.mode = Mode::Init;
match init_matches.value_of("shell").unwrap() {
- "bash" => {
- settings.init_mode = InitMode::Bash;
- }
"zsh" => {
settings.init_mode = InitMode::Zsh;
}