how to write basic functions in fish shell
First off to create a function while in the fish shell we will type "func" and then pass an arguemnt and that will be the function name you desire.
You can pass these flags for
- i | interactive mode
- e | open in external editor
s | autosave after succesful edit
funced -i test
Save your function, test your function first to make sure it works.
make dir and cd into it and also pwd
mkdir $argv && cd $argv && pwd
cd into my project folder then git clone a project
cd projects && git clone $argv
search the aur with yay -s
yay -s $argv
You can now create basic funtions in fish!
here are my git files, check them out! fish-functions on Github