Software >
(on Wikipedia)
https://fishshell.com/
Why use fish? One word, from the fish design document: discoverability. This is the one thing which has held me back from transitioning my mindset from my old DOS CLI days to the Linux CLI.
- friendly interactive shell
-
See also Zsh > zsh syntax highlighting, which is fish-like.
--
-
2008-12-31 - 1.23.0 on PCLinuxOS 2007 updated Jan 2009
2008-12-31 - 1.23.0 ∞
Installation ∞
Download the source .tar.bz2 ∞
wget www.fishshell.org/files/1.23.0/fish-1.23.0.tar.bz2
install dependencies ∞
apt-get install gettext libgettextmisc
This is to get gettext's msgfmt
installed.
compile fish ∞
su tar -xvvjf fish-1.23.0.tar.bz2 cd fish-1.23.0 ./configure --without-xsel make]] && make install
post-compilation installation ∞
su # Changing the default shell. echo "/usr/local/bin/fish" >> /etc/shells chsh -s /usr/local/bin/fish user
Configuration ∞
See Configuration
Configuration ∞
This wasn't really completed.. I stopped using Fish.
Relevant files:
~/.config/fish /usr/local/share/fish/config.fish
Adding to your PATH
when using a login shell:
if status --is-login set PATH $PATH ~/linux/bin end
Run commands when fish exits:
function on_exit --on-process %self echo fish is now exiting end
(This doesn't work with my tests.)
Change the virtual term title:
function fish_title echo $_ ' ' pwd end
Issues ∞
xsel
-- It's not installed on my system, and I haven't bothered to get it yet. Without it, I suspect the link between the shell and the x-windows clipboard will be broken. It's not a big deal, but it'll be cool to fix later.-
tab completion takes forever on some executables, like
cal
.
completion ∞
Completion is stated to not be complete. One I'd like is a more sensible cd
:
cd <tab> Desktop/ (Directory in /root) Pictures/ (Directory in /root) Documents/ (Directory in /root) three/ (Directory in .) Movies/ (Directory in /root) tmp/ (Directory in /root) Music/ (Directory in /root) two/ (Directory in .) one/ (Directory in .)
This will spit out all the directories in .
and my home directory.
I'm expecting it to begin alphabetically from the current directory and cycle back and forth through them.
cd <tab> cd one <tab> cd three <tab> cd two <tab> cd one <shift-tab> cd two
- I'm not sure where to find better help.
-
I'm not sure how to make my changes permanent.
keys don't all work ∞
notes:
control-left
/control-right
-
home
/end
andcontrol-home
/control-end
home
/end
work when I make a new user that does not have the global variable stuff infishd.localhost
xev
and showkey
might help here.
The bind
command is supposed to work. It doesn't seem sane to me. Some documentation:
```
/usr/local/share/doc/fish/index.html#editor
/usr/local/share/doc/fish/commands.html#bind
```
bind --function-names|leafpad& bind --key-names|leafpad&
Some of my keys don't work, and some keyboard activities don't work the way I expect.
The built-in documentation isn't doing it for me, and I'm just discovering most of this. I've run into some issues that I'd like another perspective on..
problem 1: ∞
I don't seem to be able to bind the way I expect. Example:
bind -k home beginning-of-line test string<home> test string[1~
So when I press <home>
I just get [1~
printed.
BUG REPORT? It seems the named keys do not work when the corresponding character sequence is bound to something different. If so, then that is a bug.
It's odd, because I'd had home
/ end
rebound successfully before, by pressing the actual keys during the bind process, like so:
bind <home> beginning-of-line bind <end> end-of-line
I don't want to do things this way though. What if I have home
and end
already bound, and next year I want to re-bind them to something new? At that point, I couldn't get the 'home' or 'end' raw characters back. (I vaguely remember a way, but I cannot recall enough to search for it)
Am I forced to use bind's "erase mode" or is there some other solution? How would I do that?
Also, how would I make my bind changes permanent? Is there just some text file that I could edit? That would be easiest.
TODO: make changes to ~/.config/fish/config.fish
problem 2 ∞
On a blank line (new shell), I do this:
<UpArrow> (previous command) <control-c> <UpArrow> (second-to-previous command)
I am expecting to see the previous command.
I am currently forced to do this:
<UpArrow> (previous command) <control-c> <Enter> <UpArrow> (previous command)
I very regularly press control-c
to blank the line, and I want to avoid needing to press enter
.
Instead of control-c
, I could use control-u
but that's not optimal as it will begin to insert junk in my clipboard, and it's not fast or easy to do with one hand.
problem 3 ∞
I bound home to beginning-of-line, and I want it to work when looking at the history.
This is what I see:
echo this is a test this is a test <UpArrow> echo this is a test <Home>
So when viewing the command history and pressing <home>
it wipes out the line.
I am expecting it to move my cursor to the beginning of the line.
I am forced to press up
, then add a space
, then press home
. I want to just have home
go to the beginning of the line.
TODO: this is a keybinding issue I think.
xterm still runs bash ∞
Setting the default shell to fish won't work with xterm. I'm using this command from an Openbox hotkey:
xterm -fn 9x15 -bg black -fg gray -sl 10000 -geometry 80x24+0+0
I solved it with this:
xterm -fn 9x15 -bg black -fg gray -sl 10000 -geometry 80x24+0+0 -exec fish
"help" doesn't work at the real CLI ∞
I cannot run help
at the real CLI outside of X. It says:
kdeinit: Aborting. is not set. DCOPRef::call(): no DCOP client or client not attached error WARNING: DCOPReply<>: cast to 'QCString' error
documentation ∞
help difference The file or folder /usr/local/share/doc/fish/difference.html does not exist.
--
near /usr/local/share/doc/fish/index.html#editor
If the environment variable DISPLAY is set, fish will try to connect to the X-windows server specified by this variable, and use the clipboard on the X server for copying and pasting.
Should this also mention xsel
being needed for this?
--
near /usr/local/share/doc/fish/index.html#editor
On startup, fish evaluates the files /usr/share/fish/config.fish (Or /usr/local/fish... if you installed fish in /usr/local)
Not true, it's /usr/local/share/fish
on my system.
--
bottom of /usr/local/share/doc/fish/index.html
has a typo:
There have been stray reports of issues with strang values of the PATH variable during startup.
=>
There have been stray reports of issues with strange values of the PATH variable during startup.
Review ∞
What the hell is a .fish
file? Sigh.
/usr/local/share/fish/config.fish => /usr/local/share/fish/config
--
-
An auto-logout feature is on their possible features list:
/usr/local/share/doc/fish/index.html
Fish vs Bash ∞
(Bash)
A lot of things destroy the compatibility that I require, forcing me to keep bash so that I can cut-and-paste simple scripts into the commandline.
command
isn't used. Uses (command).- I can't use wget and paste a valid URL which has a ? in it. Maybe I have to quote it?
-
...
Last updated 2024-10-12 at 13:30:18