Basic settings for fish shell
This commit is contained in:
11
fishrc
Normal file
11
fishrc
Normal 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"
|
||||||
31
install.sh
31
install.sh
@@ -2,11 +2,26 @@
|
|||||||
|
|
||||||
set -E -o errexit -o nounset -o pipefail
|
set -E -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
if grep -q -e 'source\s+.*/linux-workspace/bashrc\s*$' $HOME/.bashrc; then
|
function install_lws() {
|
||||||
echo "Linux Workspace configuration already exists in .bashrc !"
|
local LWS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
|
||||||
exit 1
|
|
||||||
else
|
if grep -q -e "source.*$LWS_DIR/bashrc" $HOME/.bashrc; then
|
||||||
readonly SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
|
echo "SKIP: Linux Workspace configuration already exists in .bashrc !"
|
||||||
echo "Adding to $HOME/.bashrc"
|
else
|
||||||
echo "source '$SCRIPT_DIR/bashrc'" >> "$HOME/.bashrc"
|
echo "Adding to $HOME/.bashrc"
|
||||||
fi
|
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
0
rc/01-init.fish
Normal file
Reference in New Issue
Block a user