Bug 252154 - sysutils/mcfly should have a pkg message about ~/.bashrc ~/.zshrc and ~/.config/fish/config.fish
Summary: sysutils/mcfly should have a pkg message about ~/.bashrc ~/.zshrc and ~/.conf...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/cantino/mcfly#user...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-26 06:34 UTC by Graham Perrin
Modified: 2020-12-26 06:45 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2020-12-26 06:34:53 UTC
I installed the port, closed a Konsole tab, opened a tab, tested: 

----

mowa219-gjp4-8570p% zsh
mowa219-gjp4-8570p% history
   88  csh
   89  cd /usr/local/opt/mcfly/
   90  nano .zshrc
   91  exit
   92  htop
   93  exit
   94  tail -f /var/log/messages
   95  tail -f /var/log/messages
   96  exit
   97  pkg info mcfly
   98  history
   99  env
  100  env
  101  tail ~/.zshrc
  102  nano .zshrc
  103  exit
mowa219-gjp4-8570p% 
bck-i-search: _

----

owa219-gjp4-8570p% ls -dhl /usr/local/bin/mcfly
-rwxr-xr-x  1 root  wheel   3.9M 19 Dec 07:49 /usr/local/bin/mcfly
mowa219-gjp4-8570p% cd /usr/local/share/fish/vendor_completions.d 
mowa219-gjp4-8570p% ls -dhl mcfly.fish 
-rw-r--r--  1 root  wheel   3.0K 19 Dec 07:49 mcfly.fish
mowa219-gjp4-8570p% ls -dhl /usr/local/share/zsh/site-functions/_mcfly 
-rw-r--r--  1 root  wheel   3.1K 19 Dec 07:49 /usr/local/share/zsh/site-functions/_mcfly
mowa219-gjp4-8570p% cat ~/.zshrc 
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/grahamperrin/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

export EDITOR=/usr/local/bin/nano
export VISUAL=/usr/local/bin/nano
mowa219-gjp4-8570p% whoami
grahamperrin
mowa219-gjp4-8570p% pkg info mcfly
mcfly-0.5.2
Name           : mcfly
Version        : 0.5.2
Installed on   : Sat Dec 26 00:36:22 2020 GMT
Origin         : sysutils/mcfly
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : MIT
Maintainer     : yuri@FreeBSD.org
WWW            : https://github.com/cantino/mcfly
Comment        : Fly through your shell history
Annotations    :
        FreeBSD_version: 1300132
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 3.96MiB
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.

WWW: https://github.com/cantino/mcfly
mowa219-gjp4-8570p%
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2020-12-26 06:43:18 UTC
No pkg message: 

----

grahamperrin@mowa219-gjp4-8570p:~ % pkg query '%M' mcfly

grahamperrin@mowa219-gjp4-8570p:~ % 

----

– so I took a hint from <https://github.com/cantino/mcfly#user-content-install-manually-from-source> and edited my ~/.zshrc

----

  GNU nano 5.4    .zshrc                                                                                                     
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/grahamperrin/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

export EDITOR=/usr/local/bin/nano
export VISUAL=/usr/local/bin/nano

if [[ -r "/usr/local/bin/mcfly" ]]; then
  source "/usr/local/bin/mcfly"
fi

----

I soon realised my mistake. Now: 

----

mowa219-gjp4-8570p% tail ~/.zshrc
autoload -Uz compinit
compinit
# End of lines added by compinstall

export EDITOR=/usr/local/bin/nano
export VISUAL=/usr/local/bin/nano

if [[ -r "/usr/local/share/zsh/site-functions/_mcfly" ]]; then
  source "/usr/local/share/zsh/site-functions/_mcfly"
fi
mowa219-gjp4-8570p% 

----

– and Control-R works as expected (in zsh) …