Fish updates

This commit is contained in:
David Tomaschik
2026-02-17 12:31:12 -08:00
parent 645b631afc
commit aea7b0927e
5 changed files with 50 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ on POSIX-style environments. It is cloned from github and installed from the
`install.sh` script. `install.sh` script.
It mostly relies on symlinking dotfiles and other resources into the appropriate It mostly relies on symlinking dotfiles and other resources into the appropriate
locations, bnut also installs dependencies in various ways. locations, but also installs dependencies in various ways.
I primarily target Debian Linux-based (Debian, Ubuntu, and Kali Linux) systems I primarily target Debian Linux-based (Debian, Ubuntu, and Kali Linux) systems
as well as MacOS. Other platforms are lower priorities. Shell scripts ending as well as MacOS. Other platforms are lower priorities. Shell scripts ending
@@ -15,6 +15,13 @@ beginning suggesting a different shell will be used.
`zsh` and `fish` are the key interactive shells to be configured, but `bash` `zsh` and `fish` are the key interactive shells to be configured, but `bash`
may also be used at times. may also be used at times.
## Project Structure
* `bin/`: Contains executable scripts that should be available in the shell's `PATH`.
* `dotfiles/`: Contains configuration files (dotfiles) to be symlinked into the home directory.
* `packages/`: Contains lists of packages to be installed by the `install.sh` script. Each file in this directory corresponds to a package set.
* `install.sh`: The main installation script that sets up the environment, symlinks dotfiles, and installs packages.
## Notes on Security Issues ## Notes on Security Issues
It is safe to have scripts and tools re-invoke themselves with sudo when they It is safe to have scripts and tools re-invoke themselves with sudo when they
@@ -32,3 +39,23 @@ explain solution design.
If making changes that affects how the user installs the tools, update If making changes that affects how the user installs the tools, update
`README.md` accordingly. `README.md` accordingly.
### Adding a new dotfile
1. Place the new dotfile in the `dotfiles/` directory.
2. The `install.sh` script will automatically symlink it to the home directory.
### Adding a new script to `bin/`
1. Add the new script to the `bin/` directory.
2. Ensure the script is executable (`chmod +x`).
### Adding a new package
1. Identify the appropriate package list in the `packages/` directory (e.g., `packages/cli`, `packages/kali`).
2. Add the new package name to the list.
3. If a new package set is required, create a new file in the `packages/` directory.
### Platform-specific changes
When making changes that are specific to a platform (e.g., Debian vs. macOS), please check for existing conventions in the `install.sh` script or other files. Use conditional logic (e.g., checking `uname`) to apply platform-specific settings.

View File

@@ -1,4 +1,3 @@
if test -x /opt/homebrew/bin/brew if test -x /opt/homebrew/bin/brew
/opt/homebrew/bin/brew shellenv fish | source /opt/homebrew/bin/brew shellenv fish | source
if test -d (brew --prefix)"/share/fish/completions" if test -d (brew --prefix)"/share/fish/completions"
@@ -14,5 +13,17 @@ if command -q starship
starship init fish --print-full-init | source starship init fish --print-full-init | source
end end
function install_fisher
if not test -e ~/.config/fish/functions/fisher.fish
echo "Installing Fisher for fish shell..."
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
fisher install jorgebucaran/fisher
end
end
if status --is-interactive
install_fisher
end
# Want this at the bottom to put this path first # Want this at the bottom to put this path first
fish_add_path --move --path {$HOME}/bin fish_add_path --move --path {$HOME}/bin

View File

@@ -0,0 +1,2 @@
jorgebucaran/fisher
wfxr/forgit

View File

@@ -2,6 +2,10 @@
# VERSION: 3.0 # VERSION: 3.0
SETUVAR EDITOR:vim SETUVAR EDITOR:vim
SETUVAR __fish_initialized:3800 SETUVAR __fish_initialized:3800
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ewfxr/forgit
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR _fisher_wfxr_2F_forgit_files:\x7e/\x2econfig/fish/conf\x2ed/bin\x1e\x7e/\x2econfig/fish/conf\x2ed/forgit\x2eplugin\x2efish\x1e\x7e/\x2econfig/fish/completions/_git\x2dforgit\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2ebash\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2efish
SETUVAR fish_color_autosuggestion:4D5566 SETUVAR fish_color_autosuggestion:4D5566
SETUVAR fish_color_cancel:\x2d\x2dreverse SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:39BAE6 SETUVAR fish_color_command:39BAE6

View File

@@ -32,9 +32,10 @@ function skelify {
return 1 return 1
fi fi
echo ${target} echo ${target}
mkdir -p ${HOME}/.skel/${relhome} local skeldir="${HOME}/.skel/dotfiles/${relhome}"
mv ${target} ${HOME}/.skel/${relhome}/${fname} mkdir -p "${skeldir}"
ln -s ${fulltarget} ${HOME}/.skel/${relhome}/${fname} mv ${target} "${skeldir}/${fname}"
ln -s "${skeldir}/${fname}" "${fulltarget}"
else else
echo ${target} is not a directory or file. >/dev/stderr echo ${target} is not a directory or file. >/dev/stderr
return 1 return 1