📜 ⬆️ ⬇️

How to install and configure a ridiculous fish shell in Debian Squeeze

Most recently, I discovered the Ridiculous fish shell, which is fundamentally different from bash and zsh with which I worked before. On my MacBook Pro under Mac OS X, the shell was installed without any problems and worked fine. Having mastered the new shell, I decided that it was time to install and configure it in the same way on servers that have 64-bit Debian Squeeze installed. It was then that I was faced with the fact that the 32-bit deb package that they have on the site is not installed on 64-bit Debian. And I decided to build a favorite shell from source. This process will be described in the article.

Download the source from the site and unpack them.
wget http://ridiculousfish.com/shell/files/fishfish.tar.gz tar xzf fishfish.tar.gz 

Some complexity caused the search for the necessary dependencies, I could not quickly find a place where they would be described. Probably, the dependencies are not the right ones, but for me, with such dependencies, everything is going.
 sudo apt-get install autoconf g++ libncurses5-dev libncursesw5-dev gettext 

Once the dependencies are installed, proceed with the assembly of the shell itself.
 autoconf ./configure --without-xsel 

When configuring, I specify the option --without-xsel. If you do not specify it, then the script will not find some of the X11 libraries when building it. I had no desire to install X11 on sevrer. If everything went well, you will see:
 fish is now configured. Use 'make' and 'make install' to build and install fish. 

Run the assembly.
 make 

If the build is successful, you will see:
 fish has now been built. Use 'make install' to install fish. 

After assembly, install the fish.
 sudo make install 

If everything is good, you will see:
 fish is now installed on your system. To run fish, type 'fish' in your terminal. To use fish as your login shell: * add the line '/usr/local/bin/fish' to the file '/etc/shells'. * use the command 'chsh -s /usr/local/bin/fish'. To set your colors, run 'fish_config' To scan your man pages for completions, run 'fish_update_completions' Have fun! 

Add the line / usr / local / bin / fish to / etc / shells, as recommended by the installer.
 sudoedit /etc/shells 

Choose fish as a shell.
 chsh -s /usr/local/bin/fish 

After the installation was complete, I still had some problems: annoying blinking of commands and prompts and idle generation of completions due to manpath. The problem with blinking, I decided to remove the "extra" settings in the colors in which the command shell colors. You can choose the one you like using the set fish_color_ * parameters.
 set fish_color_autosuggestion yellow set fish_color_command green set fish_color_param cyan 

The problem with the broken generation of completions was also solved with the help of a terrible stunt. Edit the file:
 sudoedit /usr/local/share/fish/tools/create_manpage_completions.py 

Go to line number 744 and as described here edit this line so that instead of
 proc = subprocess.Popen(['man', '--path'], stdout=subprocess.PIPE) 

happened
 proc = subprocess.Popen(['manpath'], stdout=subprocess.PIPE) 

Then we start the generation of completions
 fish_update_completions 

If we get everything right, something like
 Parsing man pages and writing completions to /home/rp/.config/fish/completions/ 


Voila! Enjoy the beautiful shell.


')

Source: https://habr.com/ru/post/150096/


All Articles