Basic settings for fish shell

This commit is contained in:
Martin Blazik
2025-10-09 10:35:20 +02:00
parent 3049391a4f
commit d96ef0af90
3 changed files with 34 additions and 8 deletions

11
fishrc Normal file
View File

@@ -0,0 +1,11 @@
# ~/.config/fish/config.fish
# echo "source $LWS/fishrc" > $__fish_config_dir/conf.d/lws.fish
# $__fish_config_dir/conf.d (by default, ~/.config/fish/conf.d/)
# $__fish_sysconf_dir/conf.d (by default, /etc/fish/conf.d/)
set -gx PAGER less
set -g fish_prompt_pwd_dir_length 0
# set -g fish_autosuggestion_enabled 0
# fish_config theme choose "fish default"

View File

@@ -2,11 +2,26 @@
set -E -o errexit -o nounset -o pipefail
if grep -q -e 'source\s+.*/linux-workspace/bashrc\s*$' $HOME/.bashrc; then
echo "Linux Workspace configuration already exists in .bashrc !"
exit 1
else
readonly SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
echo "Adding to $HOME/.bashrc"
echo "source '$SCRIPT_DIR/bashrc'" >> "$HOME/.bashrc"
fi
function install_lws() {
local LWS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
if grep -q -e "source.*$LWS_DIR/bashrc" $HOME/.bashrc; then
echo "SKIP: Linux Workspace configuration already exists in .bashrc !"
else
echo "Adding to $HOME/.bashrc"
echo "source '$LWS_DIR/bashrc'" >> "$HOME/.bashrc"
fi
if [[ -d $HOME/.config/fish/ ]]; then
if [[ -f $HOME/.config/fish/config.fish ]]; then
echo "SKIP: Linux Workspace configuration already exists in fish config !"
else
echo "Adding to $HOME/.config/fish/conf.d/lws.fish"
echo "source $LWS_DIR/fishrc" > $__fish_config_dir/conf.d/lws.fish
fi
else
echo "Fish configuration directory not found, skipping fish setup."
fi
}
install_lws

0
rc/01-init.fish Normal file
View File