cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.76k stars 176 forks source link

bash: mcfly: command not found #289

Closed domy86 closed 1 year ago

domy86 commented 1 year ago

Hi,

I need help with setting up mcfly on my Raspberry Pi 4 with Ubuntu 22.04.1 LTS. I have followed the install instructions on all of my machines but it's not working on RPi only.

domy@Domy-NB:~$ pi
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1016-raspi aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon Oct 10 11:15:28 PM CEST 2022

  System load:  0.16015625          Processes:             225
  Usage of /:   13.3% of 116.94GB   Users logged in:       1
  Memory usage: 9%                  IPv4 address for eth0: 10.x.x.x
  Swap usage:   0%                  IPv4 address for tun0: 10.x.x.x
  Temperature:  45.8 C

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.

Last login: Mon Oct 10 23:04:15 2022 from 10.17.25.111
-bash: mcfly: command not found
domy@domy-pi:~$ cat .bashrc | grep mcfly
eval "$(mcfly init bash)"
domy@domy-pi:~$ ls -l .bashrc .bash_history 
-rw-r--r-- 1 domy domy  256 lis  10 23:15 .bash_history
-rw-r--r-- 1 domy domy 4831 lis  10 22:56 .bashrc
domy@domy-pi:~$ echo $PATH
/home/domy/.local/bin:/home/domy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
domy@domy-pi:~$ which mcfly
/home/domy/bin/mcfly
domy@domy-pi:~$ file /home/domy/bin/mcfly
/home/domy/bin/mcfly: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=5ffe928d7804f2d561065da7f10d10728bb3dabb, for GNU/Linux 3.7.0, with debug_info, not stripped
domy@domy-pi:~$ mcfly --version
McFly 0.6.1
domy@domy-pi:~$ eval "$(mcfly init bash)"
domy@domy-pi:~$ 

If I run eval "$(mcfly init bash)" or . .bashrc manually, it works fine until I reopen a terminal or SSH connection. Any ideas?

domy86 commented 1 year ago

OK, found the problem, mcfly should be in a systemwide directory like /usr/bin.

domy@Domy-NB:~$ pi
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1016-raspi aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon Oct 10 11:42:32 PM CEST 2022

  System load:  0.10791015625       Processes:             232
  Usage of /:   13.3% of 116.94GB   Users logged in:       1
  Memory usage: 11%                 IPv4 address for eth0: 10.x.x.x
  Swap usage:   0%                  IPv4 address for tun0: 10.x.x.x
  Temperature:  47.7 C

 * Super-optimized for small spaces - read how we shrank the memory
   footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.

Last login: Mon Oct 10 23:42:44 2022 from 10.17.25.111
domy@domy-pi:~$ which mcfly
/usr/bin/mcfly

Closing the ticket.