I’m interested to get into Fish terminal - though I’m aware that there are some differences which will give me headaches.
I already have zsh set up very nicely - so I’m curious to get tips and if anyone else is trying this stuff out, maybe share some ideas.
The first thing I wanted to work out (and looking at documents - it looks pretty complicated) was the basic cheats. Starting with ALIAS commands, and the ability to EXPAND the alias commands.
Anyway, right now I’m doing some ‘alias’ type commands:
alias lx='exa --icons --group-directories-first'
from zsh
Bear with me. I hope I’m not getting confused here… but the firest advice we get is to add this as a ‘function’.
To do this in fish we can do this:
alias c='clear'
Followed by funcsave c
Now if you type c
it will do clear
.
However, in zsh I always have my alias commands expand - so now we will abandon ‘alias’ and use ‘abbr’.
This is an attractive side of fish.
From zsh I have:
alias convertmkv-mp4='for i in *.mkv; do ffmpeg -i "$i" -c:a copy -c:v copy "${i%.*}.mp4"; done'
Which is easy to remember, gets me the sentence so that I can tweak/edit before executing.
This can’t be added as a function in fish - but now I decided to quit alias.
Now we have alias alias='abbr'
then funcsave alias
.
This turns 'alias ’ into the zsh feature, an abbreviation which you type to paste the whole sentence.
Now - we paste the original zsh alias:
alias convertmkv-mp4='for i in *.mkv; do ffmpeg -i "$i" -c:a copy -c:v copy "${i%.*}.mp4"; done'
Then we delete the =
and hit <enter>
Now it’s moved to fish as an abbreviation.
So all in all it is pretty nice for adding ‘alias’ commands.
It’s the ‘tab’ completion - which has the magic talent of accessing the man pages and bringing up options with explanations which makes it a sexy option to me…