# fish_config to: adjust color-scheme, change prompt, see defined functions and system variables, review command-line history, key-bindings.
~/.config/fish/functions/ holds locally-defined functions such as redefine or alias in bash.
/etc/fish/ holds system-wide functions, completions, and configuration. Location defined by fish variable __fish_sysconf_dir
To give fish-shell a fixed list of predefined options for a command, define a completion in ~/.config/fish/completions/ These options will open up with the tab key. For example, a command called gamplet with an options mymodel and yourmodel defined as -M or --model would be defined in ~/.config/completions/gamplet.fish as follows:
complete -c gamplet -s M -l model -a mymodel -d "my amazing model"
complete -c gamplet -s M -l model -a yourmodel -d "your incredible model"
A simple script to generate model variants from a general-purpose OpenSCAD model might look like:
#!/usr/bin/env fish
set models HX2 CX2 IX1 HF1
set model_name (status basename)
for m in $models
openscad -o "$model_name-$m.obj" -D type=\"$m\" $model_name.scad
end