Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding comments in a fish shell function file

Tags:

How do I add comments to a function a write for fish shell? Is it //. I can't seem to be able to tell. When I use //, sometimes when the function fails, it changes the user to the root directory.

like image 736
aa8y Avatar asked Feb 23 '15 00:02

aa8y


People also ask

How do I customize my fish shell prompt?

fish is empty by default. To create a custom prompt create a file ~/. config/fish/functions/fish_prompt. fish and fill it with your prompt.

Where is the fish shell config file?

Configuration. To store configuration write it to a file called ~/. config/fish/config. fish .

How do you write a fish script?

To be able to run fish scripts from your terminal, you have to do two things. Add the following shebang line to the top of your script file: #!/usr/bin/env fish . Mark the file as executable using the following command: chmod +x <YOUR_FISH_SCRIPT_FILENAME> .

How do you change fish shells?

Switching to fish? If you wish to use fish (or any other shell) as your default shell, you need to enter your new shell's executable /usr/local/bin/fish in two places: add /usr/local/bin/fish to /etc/shells. change your default shell with chsh -s to /usr/local/bin/fish.


1 Answers

The comment sign is #, as glenn jackman suggested.

like image 51
xealits Avatar answered Oct 23 '22 00:10

xealits