[fish] Clean up

This commit is contained in:
2021-12-20 21:27:52 -05:00
parent 68c008dbda
commit b97a299d8c
70 changed files with 0 additions and 2645 deletions

View File

@ -1,7 +0,0 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View File

@ -1,9 +0,0 @@
complete tide --no-files
complete tide -x -n __fish_use_subcommand -a --help -d "Print help message"
complete tide -x -n __fish_use_subcommand -a --version -d "Print tide version"
complete tide -x -n __fish_use_subcommand -a bug-report -d "Print info for use in bug reports"
complete tide -x -n __fish_use_subcommand -a configure -d "Run the configuration wizard"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -a --clean -d "Run clean Fish instance and install Tide"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -a --verbose -d "Print full Tide configuration"

View File

@ -1,45 +0,0 @@
function _tide_init_install --on-event _tide_init_install
set -U tide_os_icon (_tide_detect_os)
set -U VIRTUAL_ENV_DISABLE_PROMPT true
set -U _tide_var_list tide_os_icon VIRTUAL_ENV_DISABLE_PROMPT
source (functions --details _tide_sub_configure)
_load_config lean
_tide_finish
set -a _tide_var_list (set --names | string match --regex "^tide.*")
status is-interactive && switch (read --prompt-str="Configure tide prompt? [Y/n] " | string lower)
case y ye yes ''
tide configure
case '*'
printf '%s' \n 'Run ' (printf '%s' "tide configure" | fish_indent --ansi) ' to customize your prompt.' \n
end
end
function _tide_init_update --on-event _tide_init_update
# v5 introduced tide_prompt_min_cols. Only proceed if older than v5
set --query tide_prompt_min_cols && return
# Save old vars to tmp file
set -l tmp (mktemp -t tide_old_config.XXXXX)
tide bug-report --verbose >$tmp
# Delete old vars
set -e $_tide_var_list _tide_var_list $_tide_prompt_var
# Print a warning
set_color yellow
echo "You have upgraded to version 5 of Tide."
echo "Since there are breaking changes, your old configuraton has been saved in:"
set_color normal
echo $tmp
sleep 5
_tide_init_install
end
function _tide_init_uninstall --on-event _tide_init_uninstall
set -e $_tide_var_list _tide_var_list $_tide_prompt_var
functions --erase (functions --all | string match --entire --regex '^_tide_')
end

View File

@ -1,5 +0,0 @@
if test -n "$ASDF_DATA_DIR" -a -d "$ASDF_DATA_DIR"
source $ASDF_DATA_DIR/asdf.fish
else if test -d ~/.asdf
source ~/.asdf/asdf.fish
end

View File

@ -1,8 +0,0 @@
if type -q direnv
function __direnv_export_eval --on-variable PWD
status --is-command-substitution; and return
eval (direnv export fish)
end
else
echo "Install direnv first! Check http://direnv.net" 2>&1
end

View File

@ -1,684 +0,0 @@
# GitNow — Speed up your Git workflow. 🐠
# https://github.com/joseluisq/gitnow
function __gitnow_install -e gitnow_install
echo (gitnow -v)" is installed and ready to use!"
echo "Just run the `gitnow` command if you want explore the API."
end
function __gitnow_uninstall -e gitnow_uninstall
echo "GitNow was uninstalled successfully."
end
function gitnow -d "Gitnow: Speed up your Git workflow. 🐠" -a xversion
if [ "$xversion" = "-v" ]; or [ "$xversion" = "--version" ]
echo "GitNow version $gitnow_version"
else
__gitnow_manual | command less -r
end
end
function state -d "Gitnow: Show the working tree status in compact way"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "state"
return
end
command git status -sb
end
function stage -d "Gitnow: Stage files in current working directory"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "stage"
return
end
set -l len (count $argv)
set -l opts .
if test $len -gt 0
set opts $argv
end
command git add $opts
end
function unstage -d "Gitnow: Unstage files in current working directory"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "unstage"
return
end
set -l len (count $argv)
set -l opts .
if test $len -gt 0
set opts $argv
end
command git reset $opts
end
function show -d "Gitnow: Show commit detail objects"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "show"
return
end
set -l len (count $argv)
if test $len -gt 0
command git show $argv
else
command git show --compact-summary --patch HEAD
end
end
function untracked -d "Gitnow: Check for untracked files and directories on current working directory"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "untracked"
return
end
command git clean --dry-run -d
end
function commit -d "Gitnow: Commit changes to the repository"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "commit"
return
end
set -l len (count $argv)
if test $len -gt 0
command git commit $argv
else
command git commit
end
end
function commit-all -d "Gitnow: Add and commit all changes to the repository"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "commit-all"
return
end
stage
commit .
end
function pull -d "Gitnow: Pull changes from remote server but stashing uncommitted changes"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "pull"
return
end
set -l len (count $argv)
set -l xorigin (__gitnow_current_remote)
set -l xbranch (__gitnow_current_branch_name)
set -l xcmd ""
echo "⚡️ Pulling changes..."
set -l xdefaults --rebase --autostash --tags
if test $len -gt 2
set xcmd $argv
echo "Mode: Manual"
echo "Default flags: $xdefaults"
echo
else
echo "Mode: Auto"
echo "Default flags: $xdefaults"
if test $len -eq 1
set xbranch $argv[1]
end
if test $len -eq 2
set xorigin $argv[1]
set xbranch $argv[2]
end
set xcmd $xorigin $xbranch
set -l xremote_url (command git config --get "remote.$xorigin.url")
echo "Remote URL: $xorigin ($xremote_url)"
echo "Remote branch: $xbranch"
echo
end
command git pull $xcmd $xdefaults
end
# Git push with --set-upstream
# Shortcut inspired from https://github.com/jamiew/git-friendly
function push -d "Gitnow: Push commit changes to remote repository"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "push"
return
end
set -l opts $argv
set -l xorigin (__gitnow_current_remote)
set -l xbranch (__gitnow_current_branch_name)
if test (count $opts) -eq 0
set opts $xorigin $xbranch
set -l xremote_url (command git config --get "remote.$xorigin.url")
echo "🚀 Pushing changes..."
echo "Mode: Auto"
echo "Remote URL: $xorigin ($xremote_url)"
echo "Remote branch: $xbranch"
else
set -l v_mode "auto"
for v in $argv
switch $v
case -t --tags
set opts $xorigin $xbranch --follow-tags
set -l xremote_url (command git config --get "remote.$xorigin.url")
echo "🚀 Pushing changes..."
echo "Mode: Auto (incl. tags)"
echo "Remote URL: $xorigin ($xremote_url)"
echo "Remote branch: $xbranch"
case -h --help
echo "NAME"
echo " Gitnow: push - Push current branch to default origin"
echo "OPTIONS:"
echo " -t --tags (auto mode) include annotated tags that relate to the commits"
echo " -h --help Show information about the options for this command"
return
case -\*
case '*'
set -l v_mode "manual"
echo "Mode: Manual"
end
end
end
echo
command git push --set-upstream $opts
end
function upstream -d "Gitnow: Commit all changes and push them to remote server"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "upstream"
return
end
commit-all
push
end
function feature -d "GitNow: Creates a new Gitflow feature branch from current branch" -a xbranch
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "feature"
return
end
__gitnow_gitflow_branch "feature" $xbranch
end
function hotfix -d "GitNow: Creates a new Gitflow hotfix branch from current branch" -a xbranch
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "hotfix"
return
end
__gitnow_gitflow_branch "hotfix" $xbranch
end
function bugfix -d "GitNow: Creates a new Gitflow bugfix branch from current branch" -a xbranch
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "bugfix"
return
end
__gitnow_gitflow_branch "bugfix" $xbranch
end
function release -d "GitNow: Creates a new Gitflow release branch from current branch" -a xbranch
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "release"
return
end
__gitnow_gitflow_branch "release" $xbranch
end
function merge -d "GitNow: Merges given branch into the active one"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "merge"
return
end
set -l len (count $argv)
if test $len -eq 0
echo "Merge: No argument given, needs one parameter"
return
end
set -l v_abort
set -l v_continue
set -l v_branch
for v in $argv
switch $v
case -a --abort
set v_abort $v
case -c --continue
set v_continue $v
case -h --help
echo "NAME"
echo " Gitnow: merge - Merge given branch into the active one"
echo "EXAMPLES"
echo " merge <branch to merge>"
echo "OPTIONS:"
echo " -a --abort Abort a conflicted merge"
echo " -c --continue Continue a conflicted merge"
echo " -h --help Show information about the options for this command"
return
case -\*
case '*'
set v_branch $v
end
end
# abort
if test "$v_abort";
echo "Abort the current merge"
command git merge --abort
return
end
# continue
if test "$v_continue";
echo "Continue the current merge"
command git merge --continue
return
end
# No branch defined
if not test -n "$v_branch"
echo "Provide a valid branch name to merge."
return
end
set -l v_found (__gitnow_check_if_branch_exist $v_branch)
# Branch was not found
if test $v_found -eq 0;
echo "Local branch `$v_branch` was not found. Not possible to merge."
return
end
# Detect merging current branch
if [ "$v_branch" = (__gitnow_current_branch_name) ]
echo "Branch `$v_branch` is the same as current branch. Nothing to do."
return
end
command git merge $v_branch
end
function move -d "GitNow: Switch from current branch to another but stashing uncommitted changes"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "move"
return
end
set -l v_upstream
set -l v_no_apply_stash
set -l v_branch
for v in $argv
switch $v
case -u --upstream
set v_upstream $v
case -n --no-apply-stash
set v_no_apply_stash $v
case -nu -un
set v_upstream "-u"
set v_no_apply_stash "-n"
case -h --help
echo "NAME"
echo " Gitnow: move - Switch from current branch to another but stashing uncommitted changes"
echo "EXAMPLES"
echo " move <branch to switch to>"
echo "OPTIONS:"
echo " -n --no-apply-stash Switch to a local branch but without applying current stash"
echo " -u --upstream Fetch a remote branch and switch to it applying current stash. It can be combined with --no-apply-stash"
echo " -h --help Show information about the options for this command"
return
case -\*
case '*'
set v_branch $v
end
end
# No branch defined
if not test -n "$v_branch"
echo "Provide a valid branch name to switch to."
return
end
set -l v_fetched 0
# Fetch branch from remote
if test -n "$v_upstream"
set -l v_remote (__gitnow_current_remote)
command git fetch $v_remote $v_branch:refs/remotes/$v_remote/$v_branch
command git checkout --track $v_remote/$v_branch
return
end
set -l v_found (__gitnow_check_if_branch_exist $v_branch)
# Branch was not found
if begin test $v_found -eq 0; and test $v_fetched -eq 0; end
echo "Branch `$v_branch` was not found locally. No possible to switch."
echo "Tip: Use -u (--upstream) flag to fetch a remote branch."
return
end
# Prevent same branch switching
if [ "$v_branch" = (__gitnow_current_branch_name) ]
echo "Branch `$v_branch` is the same as current branch. Nothing to do."
return
end
set -l v_uncommited (__gitnow_has_uncommited_changes)
# Stash changes before checkout for uncommited changes only
if test $v_uncommited
command git stash
end
command git checkout $v_branch
# --no-apply-stash
if test -n "$v_no_apply_stash"
echo "Stashed changes were not applied. Use `git stash pop` to apply them."
end
if begin test $v_uncommited; and not test -n "$v_no_apply_stash"; end
command git stash pop
echo "Stashed changes applied."
end
end
function logs -d "Gitnow: Shows logs in a fancy way"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "logs"
return
end
set -l v_max_commits "80"
set -l v_args
for v in $argv
switch $v
case -h --help
echo "NAME"
echo " Gitnow: logs - Show logs in a fancy way (first $v_max_commits commits by default)"
echo "EXAMPLES"
echo " logs [git log options]"
echo "EXTRA OPTIONS:"
echo " -h, --help Show information about the options for this command"
return
case -\*
case '*'
set v_args $argv
break
end
end
if test -n "$v_args"
set v_max_commits
else
set v_max_commits "-$v_max_commits"
end
LC_ALL=C command git log $v_max_commits $v_args --color --graph \
--pretty=format:"%C(red)%h%C(reset)%C(yellow)%d%Creset %s %C(green italic)(%cr)%C(reset) %C(blue)%an%C(reset) %C(white dim)%GK %C(reset)" --abbrev-commit \
| command less -R
end
function tag -d "Gitnow: Tag commits following Semver"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "tag"
return
end
set -l v_major
set -l v_minor
set -l v_patch
set -l v_premajor
set -l v_preminor
set -l v_prepatch
set -l opts
# NOTE: this function only gets the latest *Semver release version* but no suffixed ones or others
set -l v_latest (__gitnow_get_latest_semver_release_tag)
for v in $argv
switch $v
case -x --major
set v_major $v
case -y --minor
set v_minor $v
case -z --patch
set v_patch $v
case -a --annotate
set opts $opts $v
# TODO: pre-release versions are not supported yet
# case -a --premajor
# set v_premajor $v
# case -b --preminor
# set v_preminor $v
# case -c --prepatch
# set v_prepatch $v
case -l --latest
if not test -n "$v_latest"
echo "There is no any tag created yet."
else
echo $v_latest
end
return
case -h --help
echo "NAME"
echo " Gitnow: tag - List or tag commits following The Semantic Versioning 2.0.0 (Semver) [1]"
echo " [1] https://semver.org/"
echo "EXAMPLES"
echo " List tags: tag"
echo " Custom tag: tag <my tag name>"
echo " Semver tag: tag --major"
echo "OPTIONS:"
echo " Without options all tags are listed in a lexicographic order and tag names are treated as versions"
echo " -x --major Tag auto-incrementing a major version number"
echo " -y --minor Tag auto-incrementing a minor version number"
echo " -z --patch Tag auto-incrementing a patch version number"
echo " -l --latest Show only the latest Semver release tag version (no suffixed ones or others)"
echo " -a --annotate Create as annotated tag"
echo " -h --help Show information about the options for this command"
# TODO: pre-release versions are not supported yet
# echo " -a --premajor Tag auto-incrementing a premajor version number"
# echo " -b --preminor Tag auto-incrementing a preminor version number"
# echo " -c --prepatch Tag auto-incrementing a prepatch version number"
return
case -\*
case '*'
return
end
end
# List all tags in a lexicographic order and treating tag names as versions
if test -z "$argv"
__gitnow_get_tags_ordered
return
end
# Major version tags
if test -n "$v_major"
if not test -n "$v_latest"
command git tag $opts v1.0.0
echo "First major tag \"v1.0.0\" was created."
return
else
set -l vstr (__gitnow_get_valid_semver_release_value $v_latest)
# Validate Semver format before to proceed
if not test -n "$vstr"
echo "The latest tag \"$v_latest\" has no a valid Semver format."
return
end
set -l x (echo $vstr | LC_ALL=C command awk -F '.' '{print $1}')
set -l prefix (echo $v_latest | LC_ALL=C command awk -F "$vstr" '{print $1}')
set x (__gitnow_increment_number $x)
set -l xyz "$prefix$x.0.0"
command git tag $opts $xyz
echo "Major tag \"$xyz\" was created."
return
end
end
# Minor version tags
if test -n "$v_minor"
if not test -n "$v_latest"
command git tag $opts v0.1.0
echo "First minor tag \"v0.1.0\" was created."
return
else
set -l vstr (__gitnow_get_valid_semver_release_value $v_latest)
# Validate Semver format before to proceed
if not test -n "$vstr"
echo "The latest tag \"$v_latest\" has no a valid Semver format."
return
end
set -l x (echo $vstr | LC_ALL=C command awk -F '.' '{print $1}')
set -l y (echo $vstr | LC_ALL=C command awk -F '.' '{print $2}')
set -l prefix (echo $v_latest | LC_ALL=C command awk -F "$vstr" '{print $1}')
set y (__gitnow_increment_number $y)
set -l xyz "$prefix$x.$y.0"
command git tag $opts $xyz
echo "Minor tag \"$xyz\" was created."
return
end
end
# Patch version tags
if test -n "$v_patch"
if not test -n "$v_latest"
command git tag $opts v0.0.1
echo "First patch tag \"v0.1.0\" was created."
return
else
set -l vstr (__gitnow_get_valid_semver_release_value $v_latest)
# Validate Semver format before to proceed
if not test -n "$vstr"
echo "The latest tag \"$v_latest\" has no a valid Semver format."
return
end
set -l x (echo $vstr | LC_ALL=C command awk -F '.' '{print $1}')
set -l y (echo $vstr | LC_ALL=C command awk -F '.' '{print $2}')
set -l z (echo $vstr | LC_ALL=C command awk -F '.' '{print $3}')
set -l s (echo $z | LC_ALL=C command awk -F '-' '{print $1}')
if __gitnow_is_number $s
set -l prefix (echo $v_latest | LC_ALL=C command awk -F "$vstr" '{print $1}')
set s (__gitnow_increment_number $s)
set -l xyz "$prefix$x.$y.$s"
command git tag $opts $xyz
echo "Patch tag \"$xyz\" was created."
else
echo "No patch version found."
end
return
end
end
# TODO: pre-release versions are not supported yet
# TODO: Premajor version tags
# TODO: Preminor version tags
# TODO: Prepatch version tags
end
function assume -d "Gitnow: Ignore files temporarily"
if not __gitnow_is_git_repository
__gitnow_msg_not_valid_repository "assume"
return
end
set -l v_assume_unchanged "--assume-unchanged"
set -l v_files
for v in $argv
switch $v
case -n --no-assume
set v_assume_unchanged "--no-assume-unchanged"
case -h --help
echo "NAME"
echo " Gitnow: assume - Ignores changes in certain files temporarily"
echo "OPTIONS:"
echo " -n --no-assume No assume unchanged files to be ignored (revert option)"
echo " -h --help Show information about the options for this command"
return
case -\*
case '*'
set v_files $v_files $v
end
end
if test (count $v_files) -lt 1
echo "Provide files in order to ignore them temporarily. E.g `assume Cargo.lock`"
return
end
command git update-index $v_assume_unchanged $v_files
end
function github -d "Gitnow: Clone a GitHub repository using SSH"
set -l repo (__gitnow_clone_params $argv)
__gitnow_clone_repo $repo "github"
end
function bitbucket -d "Gitnow: Clone a Bitbucket Cloud repository using SSH"
set -l repo (__gitnow_clone_params $argv)
__gitnow_clone_repo $repo "bitbucket"
end

View File

@ -1,32 +0,0 @@
# GitNow — Speed up your Git workflow. 🐠
# https://github.com/joseluisq/gitnow
set -g gitnow_version 2.9.0
if set -q __fish_config_dir
set -g fish_config "$__fish_config_dir"
else
set -q XDG_CONFIG_HOME
and set -g fish_config "$XDG_CONFIG_HOME/fish"
or set -g fish_config "~/.config/fish"
end
set -q fish_snippets; or set -g fish_snippets "$fish_config/conf.d"
set -q fish_functions; or set -g fish_functions "$fish_config/functions"
set -q fish_completions; or set -g fish_completions "$fish_config/completions"
set -q GITNOW_CONFIG_FILE; or set -g GITNOW_CONFIG_FILE ~/.gitnow
if functions -q __fundle_plugins_dir
set -l fundledir (__fundle_plugins_dir)
source "$fundledir/joseluisq/gitnow/functions/__gitnow_functions.fish"
source "$fundledir/joseluisq/gitnow/functions/__gitnow_manual.fish"
source "$fundledir/joseluisq/gitnow/functions/__gitnow_config_file.fish"
source "$fundledir/joseluisq/gitnow/completions/__gitnow_completions.fish"
else
source "$fish_functions/__gitnow_functions.fish"
source "$fish_functions/__gitnow_manual.fish"
source "$fish_functions/__gitnow_config_file.fish"
source "$fish_completions/__gitnow_completions.fish"
end
__gitnow_read_config

View File

@ -1,63 +0,0 @@
if test -z "$Z_DATA"
if test -z "$XDG_DATA_HOME"
set -U Z_DATA_DIR "$HOME/.local/share/z"
else
set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
end
set -U Z_DATA "$Z_DATA_DIR/data"
end
if test ! -e "$Z_DATA"
if test ! -e "$Z_DATA_DIR"
mkdir -p -m 700 "$Z_DATA_DIR"
end
touch "$Z_DATA"
end
if test -z "$Z_CMD"
set -U Z_CMD z
end
set -U ZO_CMD "$Z_CMD"o
if test ! -z $Z_CMD
function $Z_CMD -d "jump around"
__z $argv
end
end
if test ! -z $ZO_CMD
function $ZO_CMD -d "open target dir"
__z -d $argv
end
end
if not set -q Z_EXCLUDE
set -U Z_EXCLUDE "^$HOME\$"
else if contains $HOME $Z_EXCLUDE
# Workaround: migrate old default values to a regex (see #90).
set Z_EXCLUDE (string replace -r -- "^$HOME\$" '^'$HOME'$$' $Z_EXCLUDE)
end
# Setup completions once first
__z_complete
function __z_on_variable_pwd --on-variable PWD
__z_add
end
function __z_uninstall --on-event z_uninstall
functions -e __z_on_variable_pwd
functions -e $Z_CMD
functions -e $ZO_CMD
if test ! -z "$Z_DATA"
printf "To completely erase z's data, remove:\n" >/dev/stderr
printf "%s\n" "$Z_DATA" >/dev/stderr
end
set -e Z_CMD
set -e ZO_CMD
set -e Z_DATA
set -e Z_EXCLUDE
end

View File

@ -1,18 +0,0 @@
function _tide_cache_variables
# pwd
set -gx _tide_color_anchors (set_color -o $tide_pwd_color_anchors)
set -gx _tide_color_truncated_dirs (set_color $tide_pwd_color_truncated_dirs || echo)
set -gx _tide_reset_to_color_dirs (set_color normal -b $tide_pwd_bg_color; set_color $tide_pwd_color_dirs)
# git
contains git $tide_left_prompt_items $tide_right_prompt_items &&
set -gx _tide_location_color (set_color $tide_git_color_branch || echo)
# two line prompt
contains newline $tide_left_prompt_items &&
set -gx _tide_prompt_and_frame_color (set_color $tide_prompt_color_frame_and_connection -b normal)
# newline before
set -e _tide_add_newline
test "$tide_prompt_add_newline_before" = true && set -g _tide_add_newline ''
end

View File

@ -1,47 +0,0 @@
function _tide_detect_os
switch (uname | string lower)
case darwin
printf '%s'
case freebsd openbsd dragonfly
printf '%s'
case linux
_tide_detect_os_linux_cases /etc/os-release ID ||
_tide_detect_os_linux_cases /etc/os-release ID_LIKE ||
_tide_detect_os_linux_cases /etc/lsb-release DISTRIB_ID ||
printf '%s'
case '*'
printf '%s' '?'
end
end
function _tide_detect_os_linux_cases -a file key
test -e $file || return
set -l split_file (string split '=' <$file)
set -l key_index (contains --index $key $split_file) || return
set -l value (string trim --chars='"' $split_file[(math $key_index + 1)] | string lower)
set -l distro_icons \
alpine\
aosc\
arch\
centos\
coreos\
debian\
devuan\
elementary\
fedora\
gentoo\
mageia\
manjaro\
mint\
nixos\
opensuse\
raspbian\
sabayon\
slackware\
tumbleweed\
ubuntu
set -l distro_index (contains --index $value $distro_icons) || return
printf '%s' $distro_icons[(math $distro_index + 1)]
end

View File

@ -1,3 +0,0 @@
function _tide_find_and_remove -a name list --no-scope-shadowing
set -l index (contains --index $name $$list) && set -e "$list"[$index]
end

View File

@ -1,22 +0,0 @@
function _tide_item_character
if test $_tide_last_status = 0
set_color $tide_character_color
else
set_color $tide_character_color_failure
end
if test "$fish_key_bindings" = fish_default_key_bindings
printf %s $tide_character_icon
else
switch $fish_bind_mode
case insert
printf %s $tide_character_icon
case default
printf %s $tide_character_vi_icon_default
case replace replace_one
printf %s $tide_character_vi_icon_replace
case visual
printf %s $tide_character_vi_icon_visual
end
end
end

View File

@ -1,3 +0,0 @@
function _tide_item_chruby
test -n "$RUBY_VERSION" && _tide_print_item chruby $tide_chruby_icon' ' $RUBY_VERSION
end

View File

@ -1,15 +0,0 @@
function _tide_item_cmd_duration
if test $CMD_DURATION -gt $tide_cmd_duration_threshold
set -l seconds (math --scale=$tide_cmd_duration_decimals "$CMD_DURATION/1000" % 60)
set -l minutes (math --scale=0 "$CMD_DURATION/60000" % 60)
set -l hours (math --scale=0 "$CMD_DURATION/3600000")
if test $hours != 0
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $hours'h ' $minutes'm ' $seconds's'
else if test $minutes != 0
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $minutes'm ' $seconds's'
else if test $seconds != 0
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $seconds's'
end
end
end

View File

@ -1,9 +0,0 @@
function _tide_item_context
if set -q SSH_TTY
tide_context_color=$tide_context_color_ssh _tide_print_item context $USER'@'$hostname
else if contains -- $USER root toor Administrator
tide_context_color=$tide_context_color_root _tide_print_item context $USER'@'$hostname
else if test "$tide_context_always_display" = true
tide_context_color=$tide_context_color_default _tide_print_item context $USER'@'$hostname
end
end

View File

@ -1,71 +0,0 @@
function _tide_item_git
set -l location $_tide_location_color(git branch --show-current 2>/dev/null) || return
# --quiet = don't error if there are no commits
git rev-parse --quiet --git-dir --is-inside-git-dir --short HEAD |
read --local --line git_dir is_inside_git_dir sha
if test -z "$location" # Default to branch, then tag, then sha
set location '#'$_tide_location_color(git tag --points-at HEAD)[1] # get the first tag
test -z "$location" && set location '@'$_tide_location_color$sha
end
# Operation
if test -d $git_dir/rebase-merge
read tide_git_step <$git_dir/rebase-merge/msgnum
read tide_git_total_steps <$git_dir/rebase-merge/end
if test -f $git_dir/rebase-merge/interactive
set tide_git_operation rebase-i
else
set tide_git_operation rebase-m
end
else if test -d $git_dir/rebase-apply
read tide_git_step <$git_dir/rebase-apply/next
read tide_git_total_steps <$git_dir/rebase-apply/last
if test -f $git_dir/rebase-apply/rebasing
set tide_git_operation rebase
else if test -f $git_dir/rebase-apply/applying
set tide_git_operation am
else
set tide_git_operation am/rebase
end
else if test -f $git_dir/MERGE_HEAD
set tide_git_operation merge
else if test -f $git_dir/CHERRY_PICK_HEAD
set tide_git_operation cherry-pick
else if test -f $git_dir/REVERT_HEAD
set tide_git_operation revert
else if test -f $git_dir/BISECT_LOG
set tide_git_operation bisect
end
# Upstream behind/ahead. Suppress errors in case there is no upstream
git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null |
read --local --delimiter=\t upstream_behind upstream_ahead
test "$upstream_behind" = 0 && set -e upstream_behind
test "$upstream_ahead" = 0 && set -e upstream_ahead
# Git status/stash
test "$is_inside_git_dir" = true && set -l tide_git_set_dir_option -C $git_dir/..
# Suppress errors in case we are in a bare repo
set -l git_info (git $tide_git_set_dir_option --no-optional-locks status --porcelain 2>/dev/null)
set -l stash (git $tide_git_set_dir_option stash list 2>/dev/null | count) || set -e stash
set -l conflicted (string match --regex '^UU' $git_info | count) || set -e conflicted
set -l staged (string match --regex '^[ADMR].' $git_info | count) || set -e staged
set -l dirty (string match --regex '^.[ADMR]' $git_info | count) || set -e dirty
set -l untracked (string match --regex '^\?\?' $git_info | count) || set -e untracked
if set -q tide_git_operation || set -q conflicted
set -g tide_git_bg_color $tide_git_bg_color_urgent
else if set -q staged || set -q dirty || set -q untracked
set -g tide_git_bg_color $tide_git_bg_color_unstable
end
_tide_print_item git $_tide_location_color $tide_git_icon' ' (set_color white; printf %s $location
set_color $tide_git_color_operation; printf %s ' '$tide_git_operation ' '$tide_git_step/$tide_git_total_steps
set_color $tide_git_color_upstream; printf %s ' ⇣'$upstream_behind ' ⇡'$upstream_ahead
set_color $tide_git_color_stash; printf %s ' *'$stash
set_color $tide_git_color_conflicted; printf %s ' ~'$conflicted
set_color $tide_git_color_staged; printf %s ' +'$staged
set_color $tide_git_color_dirty; printf %s ' !'$dirty
set_color $tide_git_color_untracked; printf %s ' ?'$untracked)
end

View File

@ -1,3 +0,0 @@
function _tide_item_go
test -e go.mod && _tide_print_item go $tide_go_icon' ' (go version | string match --regex "[\d.]+")
end

View File

@ -1,3 +0,0 @@
function _tide_item_jobs
test $_tide_jobs_status = 0 && _tide_print_item jobs $tide_jobs_icon
end

View File

@ -1,4 +0,0 @@
function _tide_item_kubectl
set -l context (kubectl config view --minify --output 'jsonpath={.current-context}/{..namespace}' 2>/dev/null) &&
_tide_print_item kubectl $tide_kubectl_icon' ' (string replace --regex '/(|default)$' '' $context)
end

View File

@ -1,5 +0,0 @@
function _tide_item_newline
set_color $_tide_previous_bg_color -b normal
side_working_on_suffix_name=tide_"$_tide_which_side_working_on"_prompt_suffix printf '%s' $$side_working_on_suffix_name \n
set -g _tide_last_item_was_newline
end

View File

@ -1,3 +0,0 @@
function _tide_item_node
test -e package.json && _tide_print_item node $tide_node_icon' ' (node --version | string trim --chars=v)
end

View File

@ -1,3 +0,0 @@
function _tide_item_os
_tide_print_item os $tide_os_icon
end

View File

@ -1,3 +0,0 @@
function _tide_item_php
test -e composer.json && _tide_print_item php $tide_php_icon' ' (php --version | string match --regex 'PHP ([\d.]+)')[2]
end

View File

@ -1,3 +0,0 @@
function _tide_item_rustc
test -e Cargo.toml && _tide_print_item rustc $tide_rustc_icon' ' (rustc --version | string split ' ')[2]
end

View File

@ -1,4 +0,0 @@
function _tide_item_shlvl
# Non-interactive shells do not increment SHLVL, so we don't need to subtract 1
test $SHLVL -gt $tide_shlvl_threshold && _tide_print_item shlvl $tide_shlvl_icon' ' $SHLVL
end

View File

@ -1,20 +0,0 @@
function _tide_item_status
# Variables are exported as strings, convert _tide_last_pipestatus back into a list
set -l _tide_last_pipestatus (string split ' ' $_tide_last_pipestatus)
if string match --quiet --invert 0 $_tide_last_pipestatus # If there is a failure anywhere in the pipestatus
if test "$_tide_last_pipestatus" = 1 # If simple failure
contains character $tide_left_prompt_items || tide_status_bg_color=$tide_status_bg_color_failure \
tide_status_color=$tide_status_color_failure _tide_print_item status $tide_status_icon_failure' ' 1
else if test $_tide_last_status = 0
_tide_print_item status $tide_status_icon' ' \
(fish_status_to_signal $_tide_last_pipestatus | string replace SIG '' | string join '|')
else
tide_status_bg_color=$tide_status_bg_color_failure tide_status_color=$tide_status_color_failure \
_tide_print_item status $tide_status_icon_failure' ' \
(fish_status_to_signal $_tide_last_pipestatus | string replace SIG '' | string join '|')
end
else if not contains character $tide_left_prompt_items
_tide_print_item status $tide_status_icon
end
end

View File

@ -1,6 +0,0 @@
function _tide_item_terraform
if test -d .terraform
terraform workspace show | read -l workspace
test $workspace != default && _tide_print_item terraform $tide_terraform_icon' ' $workspace
end
end

View File

@ -1,3 +0,0 @@
function _tide_item_time
_tide_print_item time (date +$tide_time_format)
end

View File

@ -1,13 +0,0 @@
function _tide_item_vi_mode
test "$fish_key_bindings" != fish_default_key_bindings && switch $fish_bind_mode
case default
tide_vi_mode_bg_color=$tide_vi_mode_bg_color_default tide_vi_mode_color=$tide_vi_mode_color_default \
_tide_print_item vi_mode $tide_vi_mode_icon_default
case replace replace_one
tide_vi_mode_bg_color=$tide_vi_mode_bg_color_replace tide_vi_mode_color=$tide_vi_mode_color_replace \
_tide_print_item vi_mode $tide_vi_mode_icon_replace
case visual
tide_vi_mode_bg_color=$tide_vi_mode_bg_color_visual tide_vi_mode_color=$tide_vi_mode_color_visual \
_tide_print_item vi_mode $tide_vi_mode_icon_visual
end
end

View File

@ -1,12 +0,0 @@
function _tide_item_virtual_env
set -l split_virtual_env (string split / "$VIRTUAL_ENV") &&
if test $split_virtual_env[-2] = virtualenvs
# pipenv $VIRTUAL_ENV looks like /home/ilan/.local/share/virtualenvs/pipenv_project-EwRYuc3l
# Detect whether we are using pipenv by looking for virtualenvs. If so, remove the hash at the end.
_tide_print_item virtual_env $tide_virtual_env_icon' ' (string split -r -m1 - "$split_virtual_env[-1]")[1]
else if contains -- $split_virtual_env[-1] virtualenv venv .venv env # avoid generic names
_tide_print_item virtual_env $tide_virtual_env_icon' ' $split_virtual_env[-2]
else
_tide_print_item virtual_env $tide_virtual_env_icon' ' $split_virtual_env[-1]
end
end

View File

@ -1,35 +0,0 @@
function _tide_print_item -a item
item_bg_color_name=tide_"$item"_bg_color set item_bg_color $$item_bg_color_name
if test "$_tide_which_side_working_on" = left
if set -e _tide_last_item_was_newline
set_color $item_bg_color -b normal
printf '%s' $tide_left_prompt_prefix
else if test "$item_bg_color" = "$_tide_previous_bg_color"
set_color $tide_prompt_color_separator_same_color
printf '%s' $tide_left_prompt_separator_same_color
else
set_color $_tide_previous_bg_color -b $item_bg_color
printf '%s' $tide_left_prompt_separator_diff_color
end
else if set -e _tide_last_item_was_newline
set_color $item_bg_color -b normal
printf '%s' $tide_right_prompt_prefix
else if test "$item_bg_color" = "$_tide_previous_bg_color"
set_color $tide_prompt_color_separator_same_color
printf '%s' $tide_right_prompt_separator_same_color
else
set_color $item_bg_color -b $_tide_previous_bg_color
printf '%s' $tide_right_prompt_separator_diff_color
end
item_color_name=tide_"$item"_color set_color $$item_color_name -b $item_bg_color
if test "$tide_prompt_pad_items" = true
printf '%s' ' ' $argv[2..] ' '
else
printf '%s' $argv[2..]
end
set -g _tide_previous_bg_color $item_bg_color
end

View File

@ -1,61 +0,0 @@
function _tide_prompt
left_prompt=(_tide_left_prompt) right_prompt=(_tide_right_prompt) if set -q left_prompt[2] # If prompt is two lines
if test "$tide_left_prompt_frame_enabled" = true
set left_prompt[1] $_tide_prompt_and_frame_color╭─"$left_prompt[1]"
set left_prompt[2] $_tide_prompt_and_frame_color╰─"$left_prompt[2]"
end
if test "$tide_right_prompt_frame_enabled" = true
set right_prompt[1] "$right_prompt[1]"$_tide_prompt_and_frame_color─╮
set right_prompt[2] "$right_prompt[2]"$_tide_prompt_and_frame_color─╯
end
echo $right_prompt[2]
set -lx dist_btwn_sides (math $COLUMNS + 5 - ( # Regex removes color. 5 = @PWD@ length which will be replaced
string replace -ar '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$left_prompt[1]""$right_prompt[1]" | string length))
printf '%s' (string replace @PWD@ (_tide_pwd) "$left_prompt[1]") $_tide_prompt_and_frame_color
string repeat --no-newline --max (math max 0, $dist_btwn_sides - $pwd_length) $tide_prompt_icon_connection
printf '%s' $right_prompt[1] \n $left_prompt[2]' '
else
echo $right_prompt[1]
set -lx dist_btwn_sides (math $COLUMNS + 5 -$tide_prompt_min_cols - (
string replace -ar '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$left_prompt[1]""$right_prompt[1]" | string length))
string replace @PWD@ (_tide_pwd) "$left_prompt[1] "
end
end
function _tide_left_prompt
set -g _tide_last_item_was_newline
_tide_which_side_working_on=left for item in $tide_left_prompt_items
_tide_item_$item
end
if not set -e _tide_last_item_was_newline
set_color $_tide_previous_bg_color -b normal
printf '%s' $tide_left_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end
function _tide_right_prompt
set -g _tide_last_item_was_newline
_tide_which_side_working_on=right for item in $tide_right_prompt_items
_tide_item_$item
end
if not set -e _tide_last_item_was_newline
set_color $_tide_previous_bg_color -b normal
printf '%s' $tide_right_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end
function _tide_item_pwd
_tide_print_item pwd @PWD@
end

View File

@ -1,44 +0,0 @@
function _tide_pwd
set -l split_pwd (string replace -- $HOME '~' $PWD | string split /)
set -l split_pwd_for_length $split_pwd
# Anchor first and last directories (which may be the same)
if test -n "$split_pwd[1]" # ~/foo/bar, hightlight ~
set split_pwd_for_output $_tide_color_anchors$split_pwd[1]$_tide_reset_to_color_dirs $split_pwd[2..]
else # /foo/bar, hightlight foo not empty string
set split_pwd_for_output '' $_tide_color_anchors$split_pwd[2]$_tide_reset_to_color_dirs $split_pwd[3..]
end
set split_pwd_for_output[-1] $_tide_color_anchors$split_pwd[-1]$_tide_reset_to_color_dirs
if not test -w $PWD
set -g tide_pwd_icon $tide_pwd_icon_unwritable' '
else if test $PWD = $HOME
set -g tide_pwd_icon $tide_pwd_icon_home' '
else
set -g tide_pwd_icon $tide_pwd_icon' '
end
set -g pwd_length (string length "$tide_pwd_icon"(string join / $split_pwd_for_length))
i=1 for dir_section in $split_pwd[2..-2]
set -l parent_dir (string join -- / $split_pwd[..$i] | string replace '~' $HOME) # Uses i before increment
set i (math $i + 1)
# Returns true if any markers exist in dir_section
if test -z false (string split --max 2 " " -- "-o -e "$parent_dir/$dir_section/$tide_pwd_markers)
set split_pwd_for_output[$i] $_tide_color_anchors$dir_section$_tide_reset_to_color_dirs
else if test $pwd_length -gt $dist_btwn_sides
while set -l truncation_length (math $truncation_length + 1) &&
set -l truncated (string sub --length $truncation_length -- $dir_section) &&
test $truncated != $dir_section -a (count $parent_dir/$truncated*/) -gt 1
end
set split_pwd_for_length[$i] $truncated
set split_pwd_for_output[$i] $_tide_color_truncated_dirs$truncated$_tide_reset_to_color_dirs
set pwd_length (string length "$tide_pwd_icon"(string join / $split_pwd_for_length)) # Update length
end
end
printf '%s' $_tide_reset_to_color_dirs $tide_pwd_icon
string join -- / $split_pwd_for_output
end

View File

@ -1,15 +0,0 @@
function _tide_remove_unusable_items
# Remove tool-specific items for tools the machine doesn't have installed
for item in chruby git go kubectl node php rustc terraform virtual_env
set -l cli_names $item
switch $item
case virtual_env
set cli_names python python3
end
if not type --query $cli_names
_tide_find_and_remove $item tide_left_prompt_items
_tide_find_and_remove $item tide_right_prompt_items
end
end
end

View File

@ -1,71 +0,0 @@
function _tide_sub_bug-report
argparse c/clean v/verbose -- $argv
if set -q _flag_clean
HOME=(mktemp -d) fish --init-command "curl --silent \
https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish |
source && fisher install ilancosman/tide@v5"
else if set -q _flag_verbose
set --long | string match --regex "^_?tide.*" | # Get only tide variables
string match --regex --invert "^_tide_prompt_var.*" | # Remove _tide_prompt_var
string match --regex --invert "^_tide_prompt_data.*" | # Remove _tide_prompt_data
string match --regex --invert "^_tide_var_list.*" # Remove _tide_var_list
else
set -l fish_version (fish --version | string match --regex "fish, version (\d\.\d\.\d)")[2]
_tide_check_version Fish fish-shell/fish-shell "(\d\.\d\.\d)" $fish_version || return
set -l tide_version (tide --version | string match --regex "tide, version (\d\.\d\.\d)")[2]
_tide_check_version Tide IlanCosman/tide "v(\d\.\d\.\d)" $tide_version || return
test (git --version | string match --regex "git version ([\d\.]*)" | string replace --all '.' '')[2] -gt 2220
_tide_check_condition \
"Your git version is too old." \
"Tide requires at least version 2.22." \
"Please update before submitting a bug report." || return
# Check that omf is not installed
not functions --query omf
_tide_check_condition \
"Tide does not work with oh-my-fish installed." \
"Please uninstall it before submitting a bug report." || return
set -l fish_startup_time (fish --command "time fish -c exit" 2>&1 |
string match --regex "Executed in(.*)fish" | string trim)[2]
set -l fisher_plugins (string join ', ' $_fisher_plugins)
read --local --prompt-str "What operating system are you using? (e.g Ubuntu 20.04): " os
read --local --prompt-str "What terminal emulator are you using? (e.g Kitty): " terminal_emulator
printf '%b\n' "\nPlease copy the following information into the issue:\n" \
"fish version: $fish_version" \
"tide version: $tide_version" \
"term: $TERM" \
"os: $os" \
"terminal emulator: $terminal_emulator" \
"fish startup: $fish_startup_time" \
"fisher plugins: $fisher_plugins"
end
end
function _tide_check_version -a program_name repo_name regex_to_get_version current_version
curl --silent https://github.com/$repo_name/releases/latest |
string match --regex ".*$repo_name/releases/tag/$regex_to_get_version.*" |
read --local --line __ latestVersion
string match --quiet --regex "^$latestVersion" "$current_version"
_tide_check_condition \
"Your $program_name version is out of date." \
"The latest is $latestVersion. You have $current_version." \
"Please update before submitting a bug report."
end
function _tide_check_condition
if test "$status" != 0
set_color red
printf '%s\n' $argv
set_color normal
return 1
end
return 0
end

View File

@ -1,92 +0,0 @@
set -g _tide_color_dark_blue 0087AF
set -g _tide_color_dark_green 5FAF00
set -g _tide_color_gold D7AF00
set -g _tide_color_green 5FD700
set -g _tide_color_light_blue 00AFFF
# Create an empty fake function for each item
for func in _fake(functions --all | string match --entire _tide_item)
function $func
end
end
for file in (status dirname)/tide/configure/{choices, functions}/**.fish
source $file
end
function _tide_sub_configure
if test $COLUMNS -lt 55 -o $LINES -lt 21
printf '%s\n' 'Terminal size too small; must be at least 55 x 21'
return 1
end
set -g fake_columns $COLUMNS
test $fake_columns -gt 90 && set fake_columns 90
set -g fake_lines $LINES
set -g _tide_selected_option
_next_choice all/style
end
function _next_choice -a nextChoice
set -q _tide_selected_option || return 0
set -l cmd (string split '/' $nextChoice)[2]
$cmd
end
function _tide_title -a text
clear
set_color -o
string pad --width (math --scale=0 "$fake_columns/2" + (string length $text)/2) $text
set_color normal
end
function _tide_option -a symbol text
set -ga _tide_option_list $symbol
set_color -o
printf '%s\n' "($symbol) $text"
set_color normal
end
function _tide_menu
set -l list_with_slashes (string join '/' $_tide_option_list)
printf '%s\n' \
'(r) Restart from the beginning' \
'(q) Quit and do nothing'\n
while true
set_color -o
read --nchars 1 --prompt-str "Choice [$list_with_slashes/r/q] " input
set_color normal
switch $input
case r
set -e _tide_option_list
_next_choice all/style
break
case q
set -e _tide_selected_option # Skip through all the _next_choices
set -e _tide_option_list
clear
break
case $_tide_option_list
set -e _tide_option_list
set -g _tide_selected_option $input
break
end
end
end
function _tide_display_prompt -a var_name var_value
test -n "$var_name" && set -g $var_name $var_value
_fake_tide_prompt
printf '\n\n'
end
function _set_all_items_bg_color -a color
for var in (set --names | string match --regex "fake_.*_bg_color.*" | string match --invert --entire character)
set $var $color
end
end

View File

@ -1 +0,0 @@
# Disable default vi prompt

View File

@ -1 +0,0 @@
/usr/home/powellc/.fzf/shell/key-bindings.fish

View File

@ -1,27 +0,0 @@
function tide
argparse --stop-nonopt v/version h/help -- $argv
if set -q _flag_version
printf '%s\n' "tide, version 5.0.1"
else if set -q _flag_help
_tide_help
else if functions --query _tide_sub_$argv[1]
_tide_sub_$argv[1] $argv[2..-1]
else
_tide_help
return 1
end
end
function _tide_help
printf '%s\n' \
'Usage: tide [options] subcommand [options]' \
'' \
'Options:' \
' -v or --version print tide version number' \
' -h or --help print this help message' \
'' \
'Subcommands:' \
' configure run interactive configuration wizard' \
' bug-report print info for use in bug reports'
end

View File

@ -1,43 +0,0 @@
function finish
set_color red
_tide_title 'Overwrite tide config?'
set_color normal
_tide_option y Yes
printf '%b' '\n'
_tide_menu
switch $_tide_selected_option
case y
_tide_finish
clear
end
end
function _tide_finish
set -e _tide_selected_option # Skip through all the _next_choices
# Deal with prompt char/vi mode
if contains character $fake_tide_left_prompt_items
_tide_find_and_remove vi_mode fake_tide_right_prompt_items
else
# If no character, insert vi_mode
_tide_find_and_remove vi_mode fake_tide_right_prompt_items
if contains time $fake_tide_right_prompt_items
set fake_tide_right_prompt_items $fake_tide_right_prompt_items[1..-2] vi_mode $fake_tide_right_prompt_items[-1]
else
set -a fake_tide_right_prompt_items vi_mode
end
end
# Set the real variables
for fakeVar in (set --names | string match --regex "^fake_tide.*")
set -U (string replace 'fake_' '' $fakeVar) $$fakeVar
end
# Make sure old prompt won't display
set -e $_tide_prompt_var 2>/dev/null
# Re-initialize the prompt
source (functions --details fish_prompt)
end

View File

@ -1,33 +0,0 @@
function icons
_tide_title Icons
_tide_option 1 'Few icons'
_tide_display_prompt
_tide_option 2 'Many icons'
_enable_icons
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_disable_icons
end
_next_choice all/finish
end
function _enable_icons
set -p fake_tide_left_prompt_items os
set -g fake_tide_pwd_icon
set -g fake_tide_pwd_icon_home
set -g fake_tide_cmd_duration_icon
set -g fake_tide_git_icon
end
function _disable_icons
_tide_find_and_remove os fake_tide_left_prompt_items
set fake_tide_pwd_icon
set fake_tide_pwd_icon_home
set fake_tide_cmd_duration_icon
set fake_tide_git_icon
end

View File

@ -1,26 +0,0 @@
function prompt_colors
_tide_title 'Prompt Colors'
_tide_option 1 'True color'
_tide_display_prompt
_tide_option 2 '16 colors'
_load_config "$_tide_configure_style"_16color
set -g _tide_16color true
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_load_config "$_tide_configure_style"
set -e _tide_16color
switch $_tide_configure_style
case lean rainbow
_next_choice all/show_time
case classic
_next_choice classic/classic_prompt_color
end
case 2
_next_choice all/show_time
end
end

View File

@ -1,28 +0,0 @@
function prompt_connection
_tide_title 'Prompt Connection'
_tide_option 1 Disconnected
_tide_display_prompt fake_tide_prompt_icon_connection ' '
_tide_option 2 Dotted
_tide_display_prompt fake_tide_prompt_icon_connection '·'
_tide_option 3 Solid
_tide_display_prompt fake_tide_prompt_icon_connection '─'
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_prompt_icon_connection ' '
case 2
set -g fake_tide_prompt_icon_connection '·'
case 3
set -g fake_tide_prompt_icon_connection '─'
end
switch $_tide_configure_style
case lean
_next_choice all/prompt_connection_andor_frame_color
case classic rainbow
_next_choice powerline/powerline_prompt_frame
end
end

View File

@ -1,36 +0,0 @@
function prompt_connection_andor_frame_color
if test "$_tide_16color" = true ||
test "$fake_tide_left_prompt_frame_enabled" = false -a \
"$fake_tide_right_prompt_frame_enabled" = false -a \
"$fake_tide_prompt_icon_connection" = ' '
_next_choice all/prompt_spacing
return 0
end
_tide_title "Connection & Frame Color"
_tide_option 1 Lightest
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 808080
_tide_option 2 Light
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 6C6C6C
_tide_option 3 Dark
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 585858
_tide_option 4 Darkest
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 444444
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_prompt_color_frame_and_connection 808080
case 2
set -g fake_tide_prompt_color_frame_and_connection 6C6C6C
case 3
set -g fake_tide_prompt_color_frame_and_connection 585858
case 4
set -g fake_tide_prompt_color_frame_and_connection 444444
end
_next_choice all/prompt_spacing
end

View File

@ -1,21 +0,0 @@
function prompt_spacing
_tide_title 'Prompt Spacing'
_tide_option 1 Compact
_tide_display_prompt
printf \e\[1A # Move cursor up 1 row
_tide_display_prompt
_tide_option 2 Sparse
_tide_display_prompt
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_prompt_add_newline_before false
case 2
set -g fake_tide_prompt_add_newline_before true
end
_next_choice all/icons
end

View File

@ -1,31 +0,0 @@
function show_time
_tide_title 'Show current time?'
_tide_option 1 No
_tide_display_prompt
set -a fake_tide_right_prompt_items time
_tide_option 2 '24-hour format'
_tide_display_prompt fake_tide_time_format '%T'
_tide_option 3 '12-hour format'
_tide_display_prompt fake_tide_time_format '%r'
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_time_format ''
set -e fake_tide_right_prompt_items[-1]
case 2
set -g fake_tide_time_format '%T'
case 3
set -g fake_tide_time_format '%r'
end
switch $_tide_configure_style
case lean
_next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height
case classic rainbow
_next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators
end
end

View File

@ -1,33 +0,0 @@
function style
_tide_title 'Prompt Style'
_tide_option 1 Lean
_load_config lean
_tide_display_prompt
_tide_option 2 Classic
_load_config classic
_tide_display_prompt
_tide_option 3 Rainbow
_load_config rainbow
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_load_config lean
set -g _tide_configure_style lean
case 2
_load_config classic
set -g _tide_configure_style classic
case 3
_load_config rainbow
set -g _tide_configure_style rainbow
end
_next_choice all/prompt_colors
end
function _load_config -a name
string replace --regex '^' 'set -g fake_' <(status dirname)/../../configs/$name.fish | source
end

View File

@ -1,32 +0,0 @@
function classic_prompt_color
_tide_title 'Prompt Color'
_tide_option 1 Lightest
_set_all_items_bg_color 585858
_tide_display_prompt
_tide_option 2 Light
_set_all_items_bg_color 444444
_tide_display_prompt
_tide_option 3 Dark
_set_all_items_bg_color 303030
_tide_display_prompt
_tide_option 4 Darkest
_set_all_items_bg_color 1C1C1C
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_set_all_items_bg_color 585858
case 2
_set_all_items_bg_color 444444
case 3
_set_all_items_bg_color 303030
case 4
_set_all_items_bg_color 1C1C1C
end
_next_choice all/show_time
end

View File

@ -1,40 +0,0 @@
function classic_prompt_separators
_tide_title 'Prompt Separators'
_tide_option 1 Angled
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
_tide_display_prompt
_tide_option 2 Vertical
set -g fake_tide_left_prompt_separator_same_color '│'
set -g fake_tide_right_prompt_separator_same_color '│'
_tide_display_prompt
_tide_option 3 Slanted
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
_tide_display_prompt
_tide_option 4 Round
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
case 2
set -g fake_tide_left_prompt_separator_same_color '│'
set -g fake_tide_right_prompt_separator_same_color '│'
case 3
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
case 4
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
end
_next_choice powerline/powerline_prompt_heads
end

View File

@ -1,22 +0,0 @@
function lean_prompt_height
_tide_title 'Prompt Height'
_tide_option 1 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
_tide_display_prompt
_tide_option 2 'Two lines'
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1]
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_tide_find_and_remove newline fake_tide_left_prompt_items
_next_choice all/prompt_connection_andor_frame_color
case 2
_tide_find_and_remove newline fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1]
_next_choice all/prompt_connection
end
end

View File

@ -1,46 +0,0 @@
function powerline_prompt_frame
_tide_title 'Prompt Frame'
_tide_option 1 'No frame'
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
set -a fake_tide_left_prompt_items character
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 2 Left
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 3 Right
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled true
set -a fake_tide_left_prompt_items character
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 4 Full
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
set -a fake_tide_left_prompt_items character
case 2
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
case 3
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled true
set -a fake_tide_left_prompt_items character
case 4
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
end
_next_choice all/prompt_connection_andor_frame_color
end

View File

@ -1,40 +0,0 @@
function powerline_prompt_heads
_tide_title 'Prompt Heads'
_tide_option 1 Sharp
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_option 2 Blurred
set -g fake_tide_left_prompt_suffix '▓▒░'
set -g fake_tide_right_prompt_prefix '░▒▓'
_tide_display_prompt
_tide_option 3 Slanted
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_option 4 Round
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
case 2
set -g fake_tide_left_prompt_suffix '▓▒░'
set -g fake_tide_right_prompt_prefix '░▒▓'
case 3
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
case 4
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
end
_next_choice powerline/powerline_prompt_tails
end

View File

@ -1,30 +0,0 @@
function powerline_prompt_height
_tide_title 'Prompt Height'
_tide_option 1 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 2 'Two lines'
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items newline
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
_tide_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_next_choice all/prompt_connection_andor_frame_color
case 2
_tide_find_and_remove newline fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items newline
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_next_choice all/prompt_connection
end
end

View File

@ -1,48 +0,0 @@
function powerline_prompt_tails
_tide_title 'Prompt Tails'
_tide_option 1 Flat
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 2 Blurred
set -g fake_tide_left_prompt_prefix '░▒▓'
set -g fake_tide_right_prompt_suffix '▓▒░'
_tide_display_prompt
_tide_option 3 Sharp
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 4 Slanted
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 5 Round
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
case 2
set -g fake_tide_left_prompt_prefix '░▒▓'
set -g fake_tide_right_prompt_suffix '▓▒░'
case 3
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
case 4
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
case 5
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
end
_next_choice powerline/powerline_prompt_height
end

View File

@ -1,40 +0,0 @@
function rainbow_prompt_separators
_tide_title 'Prompt Separators'
_tide_option 1 Angled
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
_tide_display_prompt
_tide_option 2 Vertical
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
_tide_display_prompt
_tide_option 3 Slanted
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
_tide_display_prompt
_tide_option 4 Round
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
case 2
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
case 3
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
case 4
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
end
_next_choice powerline/powerline_prompt_heads
end

View File

@ -1,105 +0,0 @@
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_character_icon ''
tide_character_vi_icon_default ''
tide_character_vi_icon_replace '▶'
tide_character_vi_icon_visual V
tide_chruby_bg_color 444444
tide_chruby_color B31209
tide_chruby_icon ''
tide_cmd_duration_bg_color 444444
tide_cmd_duration_color 87875F
tide_cmd_duration_decimals 0
tide_cmd_duration_icon
tide_cmd_duration_threshold 3000
tide_context_always_display false
tide_context_bg_color 444444
tide_context_color_default D7AF87
tide_context_color_root $_tide_color_gold
tide_context_color_ssh D7AF87
tide_git_bg_color 444444
tide_git_bg_color_unstable 444444
tide_git_bg_color_urgent 444444
tide_git_color_branch $_tide_color_green
tide_git_color_conflicted FF0000
tide_git_color_dirty $_tide_color_gold
tide_git_color_operation FF0000
tide_git_color_staged $_tide_color_gold
tide_git_color_stash $_tide_color_green
tide_git_color_untracked $_tide_color_light_blue
tide_git_color_upstream $_tide_color_green
tide_git_icon
tide_go_bg_color 444444
tide_go_color 00ACD7
tide_go_icon
tide_jobs_bg_color 444444
tide_jobs_color $_tide_color_dark_green
tide_jobs_icon ''
tide_kubectl_bg_color 444444
tide_kubectl_color 326CE5
tide_kubectl_icon '⎈'
tide_left_prompt_frame_enabled true
tide_left_prompt_items pwd git newline
tide_left_prompt_prefix ''
tide_left_prompt_separator_diff_color ''
tide_left_prompt_separator_same_color ''
tide_left_prompt_suffix ''
tide_node_bg_color 444444
tide_node_color 44883E
tide_node_icon '⬢'
tide_os_bg_color 444444
tide_os_color EEEEEE
tide_php_bg_color 444444
tide_php_color 617CBE
tide_php_icon ''
tide_prompt_add_newline_before true
tide_prompt_color_frame_and_connection 6C6C6C
tide_prompt_color_separator_same_color 949494
tide_prompt_icon_connection ' '
tide_prompt_min_cols 26
tide_prompt_pad_items true
tide_pwd_bg_color 444444
tide_pwd_color_anchors $_tide_color_light_blue
tide_pwd_color_dirs $_tide_color_dark_blue
tide_pwd_color_truncated_dirs 8787AF
tide_pwd_icon
tide_pwd_icon_home
tide_pwd_icon_unwritable ''
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc php chruby go kubectl terraform vi_mode
tide_right_prompt_prefix ''
tide_right_prompt_separator_diff_color ''
tide_right_prompt_separator_same_color ''
tide_right_prompt_suffix ''
tide_rustc_bg_color 444444
tide_rustc_color F74C00
tide_rustc_icon ''
tide_shlvl_bg_color 444444
tide_shlvl_color d78700
tide_shlvl_icon ''
tide_shlvl_threshold 1
tide_status_bg_color 444444
tide_status_bg_color_failure 444444
tide_status_color $_tide_color_dark_green
tide_status_color_failure D70000
tide_status_icon '✔'
tide_status_icon_failure '✘'
tide_terraform_bg_color 444444
tide_terraform_color 844FBA
tide_terraform_icon
tide_time_bg_color 444444
tide_time_color 5F8787
tide_time_format '%T'
tide_vi_mode_bg_color_default 444444
tide_vi_mode_bg_color_replace 444444
tide_vi_mode_bg_color_visual 444444
tide_vi_mode_color_default 87af00
tide_vi_mode_color_replace d78700
tide_vi_mode_color_visual 5f87d7
tide_vi_mode_icon_default DEFAULT
tide_vi_mode_icon_replace REPLACE
tide_vi_mode_icon_visual VISUAL
tide_virtual_env_bg_color 444444
tide_virtual_env_color 00AFAF
tide_virtual_env_icon ''

View File

@ -1,59 +0,0 @@
tide_character_color brgreen
tide_character_color_failure brred
tide_chruby_bg_color black
tide_chruby_color red
tide_cmd_duration_bg_color black
tide_cmd_duration_color brblack
tide_context_bg_color black
tide_context_color_default yellow
tide_context_color_root bryellow
tide_context_color_ssh yellow
tide_git_bg_color black
tide_git_bg_color_unstable black
tide_git_bg_color_urgent black
tide_git_color_branch brgreen
tide_git_color_conflicted brred
tide_git_color_dirty bryellow
tide_git_color_operation brred
tide_git_color_staged bryellow
tide_git_color_stash brgreen
tide_git_color_untracked brblue
tide_git_color_upstream brgreen
tide_go_bg_color black
tide_go_color brcyan
tide_jobs_bg_color black
tide_jobs_color green
tide_kubectl_bg_color black
tide_kubectl_color blue
tide_node_bg_color black
tide_node_color green
tide_os_bg_color black
tide_os_color brwhite
tide_php_bg_color black
tide_php_color blue
tide_prompt_color_frame_and_connection brblack
tide_prompt_color_separator_same_color brblack
tide_pwd_bg_color black
tide_pwd_color_anchors brcyan
tide_pwd_color_dirs cyan
tide_pwd_color_truncated_dirs magenta
tide_rustc_bg_color black
tide_rustc_color red
tide_shlvl_bg_color black
tide_shlvl_color yellow
tide_status_bg_color black
tide_status_bg_color_failure black
tide_status_color green
tide_status_color_failure red
tide_terraform_bg_color black
tide_terraform_color magenta
tide_time_bg_color black
tide_time_color brblack
tide_vi_mode_bg_color_default black
tide_vi_mode_bg_color_replace black
tide_vi_mode_bg_color_visual black
tide_vi_mode_color_default green
tide_vi_mode_color_replace yellow
tide_vi_mode_color_visual blue
tide_virtual_env_bg_color black
tide_virtual_env_color cyan

View File

@ -1,105 +0,0 @@
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_character_icon ''
tide_character_vi_icon_default ''
tide_character_vi_icon_replace '▶'
tide_character_vi_icon_visual V
tide_chruby_bg_color normal
tide_chruby_color B31209
tide_chruby_icon ''
tide_cmd_duration_bg_color normal
tide_cmd_duration_color 87875F
tide_cmd_duration_decimals 0
tide_cmd_duration_icon
tide_cmd_duration_threshold 3000
tide_context_always_display false
tide_context_bg_color normal
tide_context_color_default D7AF87
tide_context_color_root $_tide_color_gold
tide_context_color_ssh D7AF87
tide_git_bg_color normal
tide_git_bg_color_unstable normal
tide_git_bg_color_urgent normal
tide_git_color_branch $_tide_color_green
tide_git_color_conflicted FF0000
tide_git_color_dirty $_tide_color_gold
tide_git_color_operation FF0000
tide_git_color_staged $_tide_color_gold
tide_git_color_stash $_tide_color_green
tide_git_color_untracked $_tide_color_light_blue
tide_git_color_upstream $_tide_color_green
tide_git_icon
tide_go_bg_color normal
tide_go_color 00ACD7
tide_go_icon
tide_jobs_bg_color normal
tide_jobs_color $_tide_color_dark_green
tide_jobs_icon ''
tide_kubectl_bg_color normal
tide_kubectl_color 326CE5
tide_kubectl_icon '⎈'
tide_left_prompt_frame_enabled false
tide_left_prompt_items pwd git newline character
tide_left_prompt_prefix ''
tide_left_prompt_separator_diff_color ' '
tide_left_prompt_separator_same_color ' '
tide_left_prompt_suffix ' '
tide_node_bg_color normal
tide_node_color 44883E
tide_node_icon '⬢'
tide_os_bg_color normal
tide_os_color normal
tide_php_bg_color normal
tide_php_color 617CBE
tide_php_icon ''
tide_prompt_add_newline_before true
tide_prompt_color_frame_and_connection 6C6C6C
tide_prompt_color_separator_same_color 949494
tide_prompt_icon_connection ' '
tide_prompt_min_cols 26
tide_prompt_pad_items false
tide_pwd_bg_color normal
tide_pwd_color_anchors $_tide_color_light_blue
tide_pwd_color_dirs $_tide_color_dark_blue
tide_pwd_color_truncated_dirs 8787AF
tide_pwd_icon
tide_pwd_icon_home
tide_pwd_icon_unwritable ''
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled false
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc php chruby go kubectl terraform
tide_right_prompt_prefix ' '
tide_right_prompt_separator_diff_color ' '
tide_right_prompt_separator_same_color ' '
tide_right_prompt_suffix ''
tide_rustc_bg_color normal
tide_rustc_color F74C00
tide_rustc_icon ''
tide_shlvl_bg_color normal
tide_shlvl_color d78700
tide_shlvl_icon ''
tide_shlvl_threshold 1
tide_status_bg_color normal
tide_status_bg_color_failure normal
tide_status_color $_tide_color_dark_green
tide_status_color_failure D70000
tide_status_icon '✔'
tide_status_icon_failure '✘'
tide_terraform_bg_color normal
tide_terraform_color 844FBA
tide_terraform_icon
tide_time_bg_color normal
tide_time_color 5F8787
tide_time_format '%T'
tide_vi_mode_bg_color_default
tide_vi_mode_bg_color_replace
tide_vi_mode_bg_color_visual
tide_vi_mode_color_default
tide_vi_mode_color_replace
tide_vi_mode_color_visual
tide_vi_mode_icon_default
tide_vi_mode_icon_replace
tide_vi_mode_icon_visual
tide_virtual_env_bg_color normal
tide_virtual_env_color 00AFAF
tide_virtual_env_icon ''

View File

@ -1,59 +0,0 @@
tide_character_color brgreen
tide_character_color_failure brred
tide_chruby_bg_color normal
tide_chruby_color red
tide_cmd_duration_bg_color normal
tide_cmd_duration_color brblack
tide_context_bg_color normal
tide_context_color_default yellow
tide_context_color_root bryellow
tide_context_color_ssh yellow
tide_git_bg_color normal
tide_git_bg_color_unstable normal
tide_git_bg_color_urgent normal
tide_git_color_branch brgreen
tide_git_color_conflicted brred
tide_git_color_dirty bryellow
tide_git_color_operation brred
tide_git_color_staged bryellow
tide_git_color_stash brgreen
tide_git_color_untracked brblue
tide_git_color_upstream brgreen
tide_go_bg_color normal
tide_go_color brcyan
tide_jobs_bg_color normal
tide_jobs_color green
tide_kubectl_bg_color normal
tide_kubectl_color blue
tide_node_bg_color normal
tide_node_color green
tide_os_bg_color normal
tide_os_color brwhite
tide_php_bg_color normal
tide_php_color blue
tide_prompt_color_frame_and_connection brblack
tide_prompt_color_separator_same_color brblack
tide_pwd_bg_color normal
tide_pwd_color_anchors brcyan
tide_pwd_color_dirs cyan
tide_pwd_color_truncated_dirs magenta
tide_rustc_bg_color normal
tide_rustc_color red
tide_shlvl_bg_color normal
tide_shlvl_color yellow
tide_status_bg_color normal
tide_status_bg_color_failure normal
tide_status_color green
tide_status_color_failure red
tide_terraform_bg_color normal
tide_terraform_color magenta
tide_time_bg_color normal
tide_time_color brblack
tide_vi_mode_bg_color_default normal
tide_vi_mode_bg_color_replace normal
tide_vi_mode_bg_color_visual normal
tide_vi_mode_color_default green
tide_vi_mode_color_replace yellow
tide_vi_mode_color_visual blue
tide_virtual_env_bg_color normal
tide_virtual_env_color cyan

View File

@ -1,105 +0,0 @@
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_character_icon ''
tide_character_vi_icon_default ''
tide_character_vi_icon_replace '▶'
tide_character_vi_icon_visual V
tide_chruby_bg_color B31209
tide_chruby_color 000000
tide_chruby_icon ''
tide_cmd_duration_bg_color C4A000
tide_cmd_duration_color 000000
tide_cmd_duration_decimals 0
tide_cmd_duration_icon
tide_cmd_duration_threshold 3000
tide_context_always_display false
tide_context_bg_color 444444
tide_context_color_default D7AF87
tide_context_color_root $_tide_color_gold
tide_context_color_ssh D7AF87
tide_git_bg_color 4E9A06
tide_git_bg_color_unstable C4A000
tide_git_bg_color_urgent CC0000
tide_git_color_branch 000000
tide_git_color_conflicted 000000
tide_git_color_dirty 000000
tide_git_color_operation 000000
tide_git_color_staged 000000
tide_git_color_stash 000000
tide_git_color_untracked 000000
tide_git_color_upstream 000000
tide_git_icon
tide_go_bg_color 00ACD7
tide_go_color 000000
tide_go_icon
tide_jobs_bg_color 444444
tide_jobs_color 4E9A06
tide_jobs_icon ''
tide_kubectl_bg_color 326CE5
tide_kubectl_color 000000
tide_kubectl_icon '⎈'
tide_left_prompt_frame_enabled true
tide_left_prompt_items pwd git newline
tide_left_prompt_prefix ''
tide_left_prompt_separator_diff_color ''
tide_left_prompt_separator_same_color ''
tide_left_prompt_suffix ''
tide_node_bg_color 44883E
tide_node_color 000000
tide_node_icon '⬢'
tide_os_bg_color CED7CF
tide_os_color 080808
tide_php_bg_color 617CBE
tide_php_color 000000
tide_php_icon ''
tide_prompt_add_newline_before true
tide_prompt_color_frame_and_connection 6C6C6C
tide_prompt_color_separator_same_color 949494
tide_prompt_icon_connection ' '
tide_prompt_min_cols 26
tide_prompt_pad_items true
tide_pwd_bg_color 3465A4
tide_pwd_color_anchors E4E4E4
tide_pwd_color_dirs E4E4E4
tide_pwd_color_truncated_dirs BCBCBC
tide_pwd_icon
tide_pwd_icon_home
tide_pwd_icon_unwritable ''
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc php chruby go kubectl terraform vi_mode
tide_right_prompt_prefix ''
tide_right_prompt_separator_diff_color ''
tide_right_prompt_separator_same_color ''
tide_right_prompt_suffix ''
tide_rustc_bg_color F74C00
tide_rustc_color 000000
tide_rustc_icon ''
tide_shlvl_bg_color 808000
tide_shlvl_color 000000
tide_shlvl_icon ''
tide_shlvl_threshold 1
tide_status_bg_color 2E3436
tide_status_bg_color_failure CC0000
tide_status_color 4E9A06
tide_status_color_failure FFFF00
tide_status_icon '✔'
tide_status_icon_failure '✘'
tide_terraform_bg_color 800080
tide_terraform_color 000000
tide_terraform_icon
tide_time_bg_color D3D7CF
tide_time_color 000000
tide_time_format '%T'
tide_vi_mode_bg_color_default 008000
tide_vi_mode_bg_color_replace 808000
tide_vi_mode_bg_color_visual 000080
tide_vi_mode_color_default 000000
tide_vi_mode_color_replace 000000
tide_vi_mode_color_visual 000000
tide_vi_mode_icon_default DEFAULT
tide_vi_mode_icon_replace REPLACE
tide_vi_mode_icon_visual VISUAL
tide_virtual_env_bg_color 444444
tide_virtual_env_color 00AFAF
tide_virtual_env_icon ''

View File

@ -1,59 +0,0 @@
tide_character_color brgreen
tide_character_color_failure brred
tide_chruby_bg_color red
tide_chruby_color black
tide_cmd_duration_bg_color yellow
tide_cmd_duration_color black
tide_context_bg_color brblack
tide_context_color_default yellow
tide_context_color_root yellow
tide_context_color_ssh yellow
tide_git_bg_color green
tide_git_bg_color_unstable yellow
tide_git_bg_color_urgent red
tide_git_color_branch black
tide_git_color_conflicted black
tide_git_color_dirty black
tide_git_color_operation black
tide_git_color_staged black
tide_git_color_stash black
tide_git_color_untracked black
tide_git_color_upstream black
tide_go_bg_color brcyan
tide_go_color black
tide_jobs_bg_color brblack
tide_jobs_color green
tide_kubectl_bg_color blue
tide_kubectl_color black
tide_node_bg_color green
tide_node_color black
tide_os_bg_color white
tide_os_color black
tide_php_bg_color blue
tide_php_color black
tide_prompt_color_frame_and_connection brblack
tide_prompt_color_separator_same_color brblack
tide_pwd_bg_color blue
tide_pwd_color_anchors brwhite
tide_pwd_color_dirs brwhite
tide_pwd_color_truncated_dirs white
tide_rustc_bg_color red
tide_rustc_color black
tide_shlvl_bg_color yellow
tide_shlvl_color black
tide_status_bg_color black
tide_status_bg_color_failure red
tide_status_color green
tide_status_color_failure bryellow
tide_terraform_bg_color magenta
tide_terraform_color black
tide_time_bg_color white
tide_time_color black
tide_vi_mode_bg_color_default green
tide_vi_mode_bg_color_replace yellow
tide_vi_mode_bg_color_visual blue
tide_vi_mode_color_default black
tide_vi_mode_color_replace black
tide_vi_mode_color_visual black
tide_virtual_env_bg_color brblack
tide_virtual_env_color cyan

View File

@ -1,3 +0,0 @@
function _fake_tide_item_cmd_duration
_fake_tide_print_item cmd_duration $fake_tide_cmd_duration_icon' ' 5s
end

View File

@ -1,3 +0,0 @@
function _fake_tide_item_git
_fake_tide_print_item git (set_color $fake_tide_git_color_branch) $fake_tide_git_icon' ' main
end

View File

@ -1,5 +0,0 @@
function _fake_tide_item_newline
set_color $_fake_tide_previous_bg_color -b normal
side_working_on_suffix_name=fake_tide_"$_fake_tide_which_side_working_on"_prompt_suffix printf '%s' $$side_working_on_suffix_name \n
set -g _fake_tide_last_item newline
end

View File

@ -1,3 +0,0 @@
function _fake_tide_item_os
_fake_tide_print_item os $tide_os_icon
end

View File

@ -1,3 +0,0 @@
function _fake_tide_item_character
_fake_tide_print_item character ' '
end

View File

@ -1,7 +0,0 @@
function _fake_tide_item_pwd
_fake_tide_print_item pwd \
(set_color $fake_tide_pwd_color_dirs)$fake_tide_pwd_icon' ' \
(set_color -o $fake_tide_pwd_color_anchors)'~'(set_color normal -b $fake_tide_pwd_bg_color) \
(set_color $fake_tide_pwd_color_dirs)'/'(set_color normal -b $fake_tide_pwd_bg_color) \
(set_color -o $fake_tide_pwd_color_anchors)'src'(set_color normal -b $fake_tide_pwd_bg_color)
end

View File

@ -1,3 +0,0 @@
function _fake_tide_item_time
_fake_tide_print_item time (date +$fake_tide_time_format)
end

View File

@ -1,38 +0,0 @@
function _fake_tide_print_item -a item
item_bg_color_name=fake_tide_"$item"_bg_color set item_bg_color $$item_bg_color_name
if test "$_fake_tide_which_side_working_on" = left
if test "$_fake_tide_last_item" = newline
if test "$item" != character
set_color $item_bg_color -b normal
printf '%s' $fake_tide_left_prompt_prefix
end
else if test "$item_bg_color" = "$_fake_tide_previous_bg_color"
set_color $fake_tide_prompt_color_separator_same_color
printf '%s' $fake_tide_left_prompt_separator_same_color
else
set_color $_fake_tide_previous_bg_color -b $item_bg_color
printf '%s' $fake_tide_left_prompt_separator_diff_color
end
else if test "$_fake_tide_last_item" = newline
set_color $item_bg_color -b normal
printf '%s' $fake_tide_right_prompt_prefix
else if test "$item_bg_color" = "$_fake_tide_previous_bg_color"
set_color $fake_tide_prompt_color_separator_same_color
printf '%s' $fake_tide_right_prompt_separator_same_color
else
set_color $item_bg_color -b $_fake_tide_previous_bg_color
printf '%s' $fake_tide_right_prompt_separator_diff_color
end
item_color_name=fake_tide_"$item"_color set_color $$item_color_name -b $item_bg_color
if test "$fake_tide_prompt_pad_items" = true -a "$item" != character
printf '%s' ' ' $argv[2..] ' '
else
printf '%s' $argv[2..]
end
set -g _fake_tide_previous_bg_color $item_bg_color
set -g _fake_tide_last_item $item
end

View File

@ -1,66 +0,0 @@
function _fake_tide_prompt
left_prompt=(_fake_tide_left_prompt) right_prompt=(_fake_tide_right_prompt) if set -q left_prompt[2] # If prompt is two lines
set -l _tide_prompt_and_frame_color (set_color $fake_tide_prompt_color_frame_and_connection -b normal || echo)
if test "$fake_tide_left_prompt_frame_enabled" = true
set left_prompt[1] $_tide_prompt_and_frame_color╭─"$left_prompt[1]"
set left_prompt[2] $_tide_prompt_and_frame_color╰─"$left_prompt[2]"
end
if test "$fake_tide_right_prompt_frame_enabled" = true
set right_prompt[1] "$right_prompt[1]"$_tide_prompt_and_frame_color─╮
set right_prompt[2] "$right_prompt[2]"$_tide_prompt_and_frame_color─╯
end
printf '%s' $left_prompt[1] $_tide_prompt_and_frame_color
set -l dist_btwn_sides (math $fake_columns - ( # Regex removes color codes
string replace -ar '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$left_prompt[1]""$right_prompt[1]" | string length))
test $dist_btwn_sides -gt 0 && string repeat --no-newline --max $dist_btwn_sides $fake_tide_prompt_icon_connection
printf '%s' $right_prompt[1] \n $left_prompt[-1]' '
string repeat --no-newline --max (math $fake_columns - ( # The -1 is necessary for some reason
string replace -ar '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$left_prompt[-1]""$right_prompt[-1]" | string length) - 1) ' '
printf '%s' $right_prompt[2]
else
printf '%s' $left_prompt[-1]' '
string repeat --no-newline --max (math $fake_columns - ( # The -1 is necessary for some reason
string replace -ar '\e(\[[\d;]*|\(B\e\[)m(\co)?' '' "$left_prompt[-1]""$right_prompt[-1]" | string length) - 1) ' '
printf '%s' $right_prompt[-1]
end
set_color normal
end
function _fake_tide_left_prompt
set -g _fake_tide_last_item newline
set -g _fake_tide_which_side_working_on left
for item in $fake_tide_left_prompt_items
_fake_tide_item_$item
end
if not contains -- $_fake_tide_last_item newline character
set_color $_fake_tide_previous_bg_color -b normal
printf '%s' $fake_tide_left_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end
function _fake_tide_right_prompt
set -g _fake_tide_last_item newline
set -g _fake_tide_which_side_working_on right
for item in $fake_tide_right_prompt_items
_fake_tide_item_$item
end
if test "$_fake_tide_last_item" != newline
set_color $_fake_tide_previous_bg_color -b normal
printf '%s' $fake_tide_right_prompt_suffix
end
set_color normal # Make sure there is something printed on the last line
end