set -Up fish_function_path ~/.dotfiles/fish/functions
Notes: the dir is realpath format, which means NO TRAILING SLASH
- Edit and save custom auto-loading function via
funced
Presume that you have custom auto-loading function directory in fish_function_path
Simply:funced <func_name>
, then funcsave -d <directory> <func_name>
(little weird that funced
doesn't have -d
option, but funcsave
does)
- Edit and save custom auto-loading function via custom editor
notepad++ ~/.dotfiles/fish/functions/<func-name>.fish
funcsave -d ~/.dotfiles/fish/functions <func-name>
Write symlinking command inside bootstraping.fish
It's true that people tend to mirror the .dotfiles
directory as a $HOME
directory, but I think that's not good. Files inside .dotfiles
can remove the .
in front of it to make seperation directory. If you do that:
- If I say
.ssh
, you know it's the symbolic linked directory in$HOME
- If I say
ssh
(no dot), you know it's the real directory resides in.dotfiles
<name>.backup
: backup the original file called<name>
<name>.dotfiles
<name>.symlink
<name>
: Shell script, no dot, no file extension. Or simply text filesconf.d
: directory for Fish functions that will load at startup.functions
: directory for Fish function that will be lazy-loaded.
or use <name>.dotfiles
to indicate its usage is from a dotfiles repository.
Dotfiles repositories usually have a naming convention where the files are prefixed with a