Giter Site home page Giter Site logo

tide's People

Contributors

aselder avatar branchvincent avatar chvolkmann avatar cmer avatar cxiao avatar daudix avatar dependabot[bot] avatar devansh08 avatar douglasdgoulart avatar elfrogster avatar epse avatar gladoskar avatar halostatue avatar huangyxi avatar ilancosman avatar ilya-bobyr avatar jorgebucaran avatar jose1711 avatar kidonng avatar mfossen avatar oati avatar okravtsov avatar orthestral avatar owen-mccormick avatar patrickf1 avatar peng1999 avatar pusewicz avatar rrevi avatar shadow53 avatar thefunctionalguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tide's Issues

single line default config doesn't show the right prompt on a brand new fish install

Bug description
When installing tide on a brand new fish install, configuring it with tide configure, selecting the single line configuration, the right prompt doesn't appear.

Note that I have a large screen (430 cols)

To Reproduce

Cleaning my dotfiles and decided to switch from zsh to fish.

Ran into this nice project which looked fine for what I'm used too, so installed it on a brand new (arch linux)/fish install.
After tide configure, selecting the single line configuration, the right prompt doesn't appear

Expected behavior
A right prompt as shown in tide configure should actually appear

Environment:

  • OS: Up-to-date arch linux
  • Fish Version: fish, version 3.1.2-1199-gd8eb7fc46
  • Tide Version: removed now, but just ran curl -sL git.io/tide | source && tide_install a few hours before opening this issue

Install errors

Getting an error on initial install. Have wiped fish config directory twice, purged through apt, and on install again am getting this:

> curl -sL git.io/tide | source && tide_install
Installing tide theme...
math: Expected at least 1 args, got 0
math: Expected at least 1 args, got 0
Tide theme installed!

Configure tide prompt? [Y/n]

These errors persist each time the shell is run. Before the fish greeting I see this same error. The prompt customizations work fine however, so not a devastating issue obviously.

Install on Debian using testing repo.

`tide_install --unattended` errors 404

Is your feature request related to a problem? Please describe

I'm trying to make a series of scripts that re-build my environment from a fresh machine install. For example, doing something like bash -c $(curl -fsSL https://setup.drhayes.io) should install everything I care about and use daily.

I noticed your GitHub action uses the --unattended flag and thought it would work for me... but it doesn't, yet.

Describe the solution you'd like

Making the --unattended flag work and documenting it would be neato. But I'll take whatever you've got. 👍🏽

I'm a fish newbie but I'm totally willing to help.

Spacing after the pointy end of the prompt

Describe the solution you'd like

I'd like to add a teeny tiny bit of padding after the > prompt
At the moment the cursor/indicator is very close to the tip of the prompt and it looks off.
Is there a way to make some space between so that the tip doesn't touch/hug the text?

Additional context

image

posture correction

Is your feature request related to a problem? Please describe

As I begin to start working, my posture worsens (back slouches and shoulder curl inwards). This is bad for my health and an arguement could be made that its also bad for my focus.

Describe the solution you'd like

I would like my prompt periodically to ask me how my posture is so that I correct it.

Additional context

Id like it to be a configuration option for my prompt to help me stay upright

Should the Pure emulator show Python virtual environment info?

Right now, I don't see any info about the virtual environment once its activated. Should I be seeing anything?

In $HOME/.config/fish/functions/tide/configure/configs/pure.fish, I see

tide_virtual_env_bg_color normal
tide_virtual_env_color 00AFAF
tide_virtual_env_display_mode 'projectName'
tide_virtual_env_icon ''

which would suggest that the project name should show up, at a minimum.

I also can confirm that these are set as universal variables for my shell with

set -U | grep "virtual_env"                                                                                                     
tide_virtual_env_bg_color normal
tide_virtual_env_color 00AFAF
tide_virtual_env_display_mode projectName
tide_virtual_env_icon 

Thanks!

The prompt char affects fish's syntax highlighting

Describe the bug

Steps to reproduce

  1. copy an arbitrary command text.
  2. open a terminal and paste the text, usually using Shift+Ins or Ctrl+Shift+V.
  3. See error

Expected behavior

Expected: (the style of echo should be bold while)
Screenshot_20201231_101408

Actual: (the color of echo becomes the same as the prompt char)
Screenshot_20201230_213637

Environment (please complete the following information)

  • Operating System: Manjaro Linux
  • Output of tide bug-report:
tide bug-report
fish, version 3.1.2
tide, version 3.0.0
alacritty

Additional context

Tested in alacritty, konsole, tmux in alacritty, and tmux in konsole. The described behaviour is consistent.

Error when using the Lean theme in Tide

Hi there,

First of all, I just want to say thanks for making this theme, I really like it, and the configuration wizard is a great touch!

Unfortunately whenever I try to use the Lean theme I get the follow error (it doesn't happen when I choose Pure).

set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 4 of file ~/.config/fish/conf.d/_tide_pwd_set_max_length.fish
in function '_tide_pwd_set_max_length' with arguments 'VARIABLE ERASE tide_pwd_truncate_margin'
	called on line 1 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish
in event handler: handler for variable 'tide_pwd_truncate_margin'
	called on line 17 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish

(Type 'help set_color' for related documentation)
set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 4 of file ~/.config/fish/conf.d/_tide_pwd_set_max_length.fish
in function '_tide_pwd_set_max_length' with arguments 'VARIABLE ERASE tide_pwd_truncate_margin'
	called on line 1 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish
in event handler: handler for variable 'tide_pwd_truncate_margin'
	called on line 17 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish

(Type 'help set_color' for related documentation)
string replace: Expected at least 2 args, got 1
set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 4 of file ~/.config/fish/conf.d/_tide_pwd_set_max_length.fish
in function '_tide_pwd_set_max_length' with arguments 'VARIABLE SET tide_pwd_truncate_margin'
	called on line 1 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish
in event handler: handler for variable 'tide_pwd_truncate_margin'
	called on line 23 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish

(Type 'help set_color' for related documentation)
string replace: Expected at least 2 args, got 1
set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 4 of file ~/.config/fish/conf.d/_tide_pwd_set_max_length.fish
in function '_tide_pwd_set_max_length' with arguments 'VARIABLE SET tide_pwd_truncate_margin'
	called on line 1 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish
in event handler: handler for variable 'tide_pwd_truncate_margin'
	called on line 23 of file ~/.config/fish/tide_theme/configure/choices/all/finish.fish

(Type 'help set_color' for related documentation)
string replace: Expected at least 2 args, got 1
string replace: Expected at least 2 args, got 1
set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 26 of file ~/.config/fish/conf.d/_tide_pwd_var_change.fish
in function '_tide_pwd_var_change' with arguments 'VARIABLE SET PWD'
	called on line 1 of file /usr/local/Cellar/fish/3.1.2/share/fish/functions/cd.fish
in event handler: handler for variable 'PWD'
	called on line 36 of file /usr/local/Cellar/fish/3.1.2/share/fish/functions/cd.fish

(Type 'help set_color' for related documentation)
set_color: Expected argument for option b

~/.config/fish/conf.d/_tide_pwd.fish (line 1):
set_color normal -b $tide_pwd_bg_color
^
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_pwd.fish
in command substitution
	called on line 15 of file ~/.config/fish/conf.d/_tide_pwd.fish
in function '_tide_pwd'
	called on line 26 of file ~/.config/fish/conf.d/_tide_pwd_var_change.fish
in function '_tide_pwd_var_change' with arguments 'VARIABLE SET PWD'
	called on line 1 of file /usr/local/Cellar/fish/3.1.2/share/fish/functions/cd.fish
in event handler: handler for variable 'PWD'
	called on line 36 of file /usr/local/Cellar/fish/3.1.2/share/fish/functions/cd.fish

(Type 'help set_color' for related documentation)
string replace: Expected at least 2 args, got 1

Pure prompt does not show git dirty state

I look at funced _tide_item_git_prompt and see that it calls fish_git_prompt (in share/fish/functions/fish_git_prompt.fish), which tells me:

# In addition, if you set __fish_git_prompt_showdirtystate to a nonempty value,
# unstaged (*) and staged (+) changes will be shown next to the branch name.
# You can configure this per-repository with the bash.showDirtyState variable,
# which defaults to true once __fish_git_prompt_showdirtystate is enabled. The
# choice to leave the variable as 'bash' instead of renaming to 'fish' is done
# to preserve compatibility with existing configured repositories.

I have set both

set __fish_git_prompt_showdirtystate 1
set __bash_git_prompt_showdirtystate 1

But dirty files are still not marked with a * when I’m in a git repo. What’s the trick to enable this?

Current directory not displayed

Describe the bug (Sorry another thread about this!)

Open shell:

~ ❯
Change directories:

~ ❯ cd Downloads

~ ❯ pwd
/home/bluebyt/Downloads
~ ❯
Directory displayed in prompt does not update

Screenshots

image

I removed OMF completely as advised in other treads about this, but the problem still occur. I did saw that I maybe need to reinstall Tide, but I don't know how to do it.

Environment (please complete the following information)

  • Operating System: Archlinux
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 3.1.0
xterm-256color

Additional context

Improve testing

  • Add unit tests for more functions
    - [ ] Find a method to test colorization doesn't seem possible for now :(
  • Add continuous integration

Todo v1.0.0

  • Generalize left side of prompt
  • Improve color variable names
  • Improve README with images, explanations etc.
  • Refactor configuration wizard

Tide prompt variables orphaned after uninstall

Describe the bug

Steps to reproduce

  1. Fresh install tide: fisher install ilancosman/tide (after manually removing whatever universal variables were left behind)
  2. configure tide by hitting 1 1 1 1 1 .... y
  3. fisher remove ilancosman/tide
  4. Open new fish session
  5. Check universal variables
$ set | rg tide
_tide_left_prompt_display_77962 \e\[38\;2\;108\;108\;108m\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \…
_tide_right_prompt_display_77962 \e\(B\e\[m\e\(B\e\[m\e\(B\e\[m\ \e\(B\e\[m\e\[38\;2\;135\;13…

$ set -S _tide_left_prompt_display_77962
$_tide_left_prompt_display_77962: not set in local scope
$_tide_left_prompt_display_77962: not set in global scope
$_tide_left_prompt_display_77962: set in universal scope, unexported, with 0 elements

Todo 2.0.0

  • Bump version number
  • Powerline
    • Separators
      • Same Color
      • Different Color
    • Frame
      • Left
      • Right
    • Configuration Wizard menus
  • Documentation
    • Get a banner/logo
    • Use a left right alternation for images/text
    • Use wiki for configuration
    • Update for powerline

Path is not updated

Describe the bug

The path in the command prompt is not updated.

Steps to reproduce

  1. cd <any directory>

Expected behavior

Tide shows the actual path in the prompt.

Screenshots

image

Environment (please complete the following information)

  • Operating System: ArchLinux
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.4.0
xterm-256color

Additional context

It works on the current terminal when I reconfigure tide.
image

Add pure support

Is your feature request related to a problem? Please describe.
Many users are comfortable with the Pure theme and setting everything up in Tide to recreate Pure is a decent bit of work.

Describe the solution you'd like
Adding a style option in the configuration wizard to make Tide look like Pure would allow these users to seamlessly transition into Tide.

Missing path on interface

Describe the bug
Since installing Oh My Fish (I think), the current path isn't showing correctly.

To Reproduce

  1. Install tide
  2. Install Oh My Fish
  3. Start iTerm

Expected behavior
To start a terminal, navigate to a directory, and have the directory path and info be available on the interface. I'm able to fix this manually by running omg reload, but I guessing this should happen automatically.

Screenshots

image

Environment (please complete the following information):

  • OS: MacOS Catalina (10.15.6)
  • Fish Version: 3.1.2
  • Tide Version: 2.2.0

Additional context
I'm brand new to using Fish, having always used zsh and oh-my-zsh prior to now.

display of last exit status displays too late.

Describe the bug

I expect the right hand exit status code to be reporting the command just run. However, it appears to lag by a command.

Steps to reproduce

  1. Type boom

Expected behavior

A failure exit code is expected, but a geen checkmark is displayed instead.

You can now type true and press return, and a red x will appear. Ths is tide is belatedly reporting failure from an earlier command.

This delay makes the exit status reporting confusing and not useful. If it can't be fixed to update the status of the previous command, it should be removed.

Environment (please complete the following information)

  • Operating System: Arch Linux
  • Output of
fish, version 3.1.2
tide, version 3.0.0
alacritty

Extraneous output on scp and troubles with ssh.

Describe the bug
A clear and concise description of what the bug is.

When using scp or tramp (in emacs) I get superfluous output
string replace: Expected at least 2 args, got 1
string replace: Expected at least 2 args, got 1
string replace: Expected at least 2 args, got 1

To Reproduce
Steps to reproduce the behavior:

  1. Set 'TERM' to 'dumb'
  2. Run 'fish'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.
I've narrowed it down to ~/.config/fish/conf.d/_tide_Ω_init.fish when it calls _tide_pwd_set_max_length

I'm not sure of the best way to fix it. It only happens when TERM is dumb or session is non-interactive. I can fix the TERM is dumb by bracketing the _tide_Ω_init.fish with if test "TERM" != "dumb" but that doesn't fix the non interactive part.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: (e.g. Ubuntu 20.04)
    Arch
  • Fish Version: (run fish --version)
    fish, version 3.1.2
  • Tide Version: (run tide --version)
    2.3.0
    Additional context
    Add any other context about the problem here.

Current dir always show "~", not matter what ever pwd is

Steps to reproduce

Use default setting.

After execute tide configure, it's woks fine. But it's not working when I open a new shell.

Expected behavior

Current dir should show that the pwd command output.

Screenshots

image

Environment (please complete the following information)

  • Operating System: macOS 10.15.7
  • Output of tide bug-report:
    fish, version 3.1.2
    tide, version 2.5.0
    xterm-kitty

Add virtualenv support

Is your feature request related to a problem? Please describe.
Python virtualenv right now is displayed as name of virtualenv in parenthesis and tide prompt follows on new line after that. I am using tide with pormpt on a new line.

Describe the solution you'd like
It should be integrated with prompt along with its own syntax coloring.

Additional context
How bobthefish has it, but virtualenv being mentioned twice is redundant.
Screenshot_20200628_225712

Where is default configuration placed?

Let me start by saying that I just started using fish so my question may be stupid. I enjoy using tide, I used configurator to come up with a nice prompt design but now I would like to tweak it a little bit more.

Where is the configuration generated by the configurator placed? The only way I managed to access it is by listing all shell variables with (set -S).

I would like to tweak it and put the whole configuration to fish.config so I can easily backup it etc.

System appearance compatibility

I'm curious if you have any configuration for light/dark mode?
When running the "pure" version and the background is dark the text is also dark color.
Is there a way to make the items more responsive to system appearance?

image

right prompt has a margin in tmux

Describe the bug

The right prompt is misplaced in tmux.

Steps to reproduce

  1. execute tmux

Expected behavior

The right prompt is expected to well aligned with terminal's right border.
Screenshot_20210102_205419

Screenshots

But it's not the case in tmux:
Screenshot_20210102_205553

Environment (please complete the following information)

  • Operating System: Manjaro Linux
  • Output of tide bug-report:
tide bug-report
fish, version 3.1.2
tide, version 3.1.0
tmux-256color

Todo v1.1.0

  • Make pwd smarter
  • Have wizard restore default config (icons, colors etc.)
  • Add completions for tide command
  • Get a vanity git.io link

follow color scheme of fish/terminal

Sorry if I missed this in the documentation somewhere---it seems that on my machine, "pure" is the only prompt whose color scheme matches the one that I have set via fish_config. Is there a way to make the colors of the other prompts track that? I would prefer to not have to set each of the colors individually to match my color scheme :) thanks!

prompt fails when trying to shorten one letter directories

Describe the bug

When I enter a directory which is long enough, the prompt stops update.
It seems that the background process stuck in the following while loop and never return.

https://github.com/IlanCosman/tide/blob/main/functions/_tide_item_pwd.fish#L44-L47

Steps to reproduce

  1. cd /tmp
  2. mkdir -p /tmp/and/a/long/enough/deep/nested/directory
  3. cd /tmp/and/a/long/enough/deep/nested/directory
  4. The prompt pwd is still /tmp

Expected behavior

The prompt should work as normal in long directories.

Environment (please complete the following information)

  • Operating System: Manjaro Linux
  • Output of tide bug-report:
tide bug-report
fish, version 3.1.2
tide, version 3.1.0
xterm-256color

Give ability to shorten the current path

Is your feature request related to a problem? Please describe

Sometimes when navigating through nested folders it can get nasty looking at the path

Describe the solution you'd like

Have a way to shorten the path of the current directory

OS detection fails in non-systemd distributions

Describe the bug

cat: /etc/os-release: No such file or directory
math: Expected at least 1 args, got 0
cat: /etc/os-release: No such file or directory
math: Expected at least 1 args, got 0
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

Steps to reproduce

  1. Launch new shell

Expected behavior

OS detection should check for /etc/lsb-release if /etc/os-release is not present

Screenshots

function _tide_detect_os_extract_os_release_info -a key
    set -l splitOsRelease (cat /etc/os-release | string split '=')
    set -l value $splitOsRelease[(math (contains --index $key $splitOsRelease)+1)]

    string trim --chars='"' $value | string lower
end

Environment (please complete the following information)

  • Operating System: Artix
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.3.0
xterm-256color

Additional context

Adding context item to left prompt

This seems mostly like a docs issue, but I found in the configuration docs that there is a context item, which is exactly what I wanted. The wizard doesn't give me that option though, so I went hunting for where the config is actually stored (how to manually add things should really be documented and once I figure it out, I'll gladly make a docs patch) and found it in fish_variables.

So I changed tide_left_prompt_items from pwd \x1egit_prompt\x1enewline\x1eprompt_char to context\x1epwd\x1egit_prompt\x1enewline\x1eprompt_char and found no difference at all. As a test, I dropped the pwd part from the variable and immediately saw the change.

Am I missing something?

Indicate number of background jobs

Is your feature request related to a problem? Please describe.
Sometimes I have multiple background jobs running and it would be useful to see how many there are.

Describe the solution you'd like
I'd like a setting for the jobs item that displays the number of background jobs running next to the tide_jobs_icon.

Strange offsets on prompt

Describe the bug

I just installed the prompt and I'm seeing strange offsets / visual defects in terminal.
Is there anything I overlooked in the setup process other than getting the font?
Do you see how the slanted/pointer shapes are misaligned ever so slightly?

Screenshots

image

Environment (please complete the following information)

  • Operating System: macOS Catalina 10.15.7 (19H2)
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.4.0
xterm-256color

Prompt showing up everywhere when resizing window

Describe the bug

Resizing the window of a terminal will make the terminal look super ugly. The prompt will show up everywhere every time it gets resized.

Steps to reproduce

  1. Set tide up
  2. Resize the window

Expected behavior

It should look clean.

Screenshots

fish

Environment (please complete the following information)

  • Operating System: Fedora
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.4.0
xterm-256color

Additional context

Config Tide via Config file

Allow users to change the prompt via JSON config file. If I need to change on feature, I have to go through the tide configure process again.

It would be helpful if tide configure save the settings to JSON config file. Therefore, a new command tide restore --configFile can be use to reimport Fish variables.

Add option to show command duration time in milliseconds

Is your feature request related to a problem? Please describe.
Seconds is too large a granularity for me.

Describe the solution you'd like
Add option to always show display execution time of commands. Can switch to seconds if execution time is more than tide_cmd_duration_threshold

Configuring tide without calling `tide configure`

I'm using Home-Manager on NixOS and since everything has to be declared ahead of time, I was wondering if that can be done with Tide. I'm assuming if I canconfigure before running fish I can avoid this error (apologize about the ugly nix store names):

[five@desktop:~/home-configuration]$ fish
/nix/store/xvin9f4plkmd5bgmclhis1jz2swj6xny-source/functions/_tide_git_prompt_set_vars.fish (line 2): switch: Expected exactly one argument, got 0

    switch $tide_git_prompt_bg_color
           ^
in function “_tide_git_prompt_set_vars”
	called on line 3 of file /nix/store/xvin9f4plkmd5bgmclhis1jz2swj6xny-source/conf.d/_tide_Ω_init.fish

from sourcing file /nix/store/xvin9f4plkmd5bgmclhis1jz2swj6xny-source/conf.d/_tide_Ω_init.fish
	called on line 15 of file ~/.config/fish/conf.d/plugin-tide.fish

from sourcing file ~/.config/fish/conf.d/plugin-tide.fish
	called on line 305 of file /nix/store/aq7sz6wvcwc5wpbwyy8rxwi8c7clkalb-fish-3.0.2/share/fish/config.fish

from sourcing file /nix/store/aq7sz6wvcwc5wpbwyy8rxwi8c7clkalb-fish-3.0.2/share/fish/config.fish
	called during startup

string replace: Expected argument
math: Expected at least 1 args, got only 0
string replace: Expected argument

I'm new to fish so I might need to change something in the fish config file as well.

Erase _tide_* "private" functions

Some _tide_* functions remain in the global scope even after uninstalling Tide. This is usually harmless, but in the case of Tide, some functions register event handlers like _tide_quit. This function will attempt to source files that no longer exist after Tide is removed from your system.

function _tide_quit --on-signal INT
clear
source "$__fish_config_dir/functions/fish_prompt.fish"
source "$__fish_config_dir/functions/_tide_left_prompt.fish"
source "$__fish_config_dir/functions/_tide_right_prompt.fish"
end

Steps to reproduce

  1. Uninstall Tide using Scuba or Fisher ≥4.x.
  2. Ctrl+C

Screenshots

source: Error encountered while sourcing file '/Users/jb/.config/fish/functions/fish_prompt.fish':
source: No such file or directory
source: Error encountered while sourcing file '/Users/jb/.config/fish/functions/_tide_left_prompt.fish':
source: No such file or directory
source: Error encountered while sourcing file '/Users/jb/.config/fish/functions/_tide_right_prompt.fish':
source: No such file or directory

Environment (please complete the following information)

  • Operating System: macOS 10.15.x

Additional context

Fixed by #43.

Make prompt asynchronous

Is your feature request related to a problem? Please describe.
The prompt can be slow at times, especially when in a git repository.

Describe the solution you'd like
An asynchronous prompt that allows the user to run commands without being blocked by the prompt loading.

fish-async-prompt already works fairly well with Tide so adapting it and then baking it in is probably the easiest path.

Extra line on Ctrl + C on 2 line prompt (low priority)

Describe the bug

When I press Ctrl + C on a empty prompt, it simply redraw the prompt.
When I press Ctrl + C on a prompt with some text, it redraw the prompt with a extra unwanted line (see screenshots)

Steps to reproduce

  1. Use a 2 line prompt
  2. Type something
  3. Press Ctrl + C

Expected behavior

A clean redraw

Screenshots

Before Ctrl + C
image
After Ctrl + C
image

Environment (please complete the following information)

  • Operating System: ArchLinux
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.5.0
xterm-256color

tide prompt hangs when the directory path is bigger than the available space

Describe the bug

When entering into a directory whose path is bigger than what the terminal can display in one line, tide prompt freezes and the terminal stops respoding

Steps to reproduce

  1. mkdir -p /tmp/large/path/bigger/than/the/terminal/can/display/in/one/line
  2. cd /tmp/large/path/bigger/than/the/terminal/can/display/in/one/line
  3. tide and fish freezes

Screenshots

github

Environment (please complete the following information)

  • Operating System: Manjaro
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 2.3.0
xterm-256color

Additional context

Current directory not updating on change

Describe the bug

When opening a new shell, the prompt correctly displays the current directory. After changing directories, however, it does not update

Steps to reproduce

  1. Open shell:
~ ❯
  1. Change directories:
~ ❯ cd workspace/

~ ❯ pwd
/Users/james.childers/workspace

~ ❯
  1. Directory displayed in prompt does not update

Expected behavior

Directory displayed by prompt should update

Environment (please complete the following information)

  • Operating System: Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64

  • Output of tide bug-report:

fish, version 3.1.2
tide, version 2.4.0
screen-256color

Additional context

It doesn't appear that the _tide_pwd function is getting called when the directory is changed. I only see it get called when a new fish session is instantiated, and not at anytime thereafter.

Tide tests assume that tide is installed in $__fish_config_dir

Describe the bug

Right now some code assumes that tide is installed under $__fish_config_dir.

If installed via fisher it is possible that tide is actually under a different directory root, through the use of $fisher_path. See this fisher issue for more details.

Steps to reproduce

Don't really know the best way to reproduce this, since I'm not familiar with how to run the tests. Should the tests be run without Tide installed, or is it okay to run them in a shell where Tide is already running?

  1. Set $fisher_path to ~/.config/fish/fisher
  2. Place the snipped from here in ~/config/.fish/conf.d/fisher.fish
  3. Install fisher
  4. Install tide
  5. See error about sourcing _tide_sub_configure.fish

I don't the setup for the tests (Do you run the tests after you've installed tide, or separately?), but I think the test above should fail.

Expected behavior

The tests should not assume an installation path, but instead discover it's installation path, and identify paths under that root.

Environment (please complete the following information)

  • Operating System: Arch Linux
  • Output of tide bug-report:
fish, version 3.1.2
tide, version 3.0.0
xterm-256color

Additional context

I had a fork that was addressing some of these issues using a universal variable, but it seems like you've removed almost all instances of this assumption. This test case is the only one left, but it seems like you've mostly eliminated the issue with a different approach, so if you could fix this one last test I think you'll have completely removed the issue.

Tide prompt leaks subprocesses (Increase in zombie/defunct subshells over time)

Describe the bug

Installation of the tide prompt creates lots of defunct/zombie processes.

Steps to reproduce

  1. Install tide
  2. Run ps axc -o pid,ucomm,tty | grep 'fish <defunct>' | wc -l and observe the number
  3. Run ps axc -o pid,ucomm,tty | grep 'fish <defunct>' | wc -l and observe that the number is higher.

You can also see the increase in number of subprocesses in htop.

Expected behavior

I would expect the number of zombie processes to be 0. Prior to the installation of Tide I had no zombie processes. The removal of Tide removed all the Zombie processes

Environment (please complete the following information)

  • Operating System: Arch Linux

  • Fish Version: 3.1.2

  • Tide Version: 3.0.0

  • Fisher version: 4.1.0

  • Fisher plugins installed:

    • jorgebucaran/fisher
    • PatrickF1/fzf.fish
    • IlanCosman/tide
  • FZF version: 0.24.4 (f502725)

  • Output of tide bug-report:

╰─tide bug-report
fish, version 3.1.2
tide, version 3.0.0
xterm-256color

Additional context

I wasn't sure the best way to figure out what the best way of tracking what the processes are doing, or why they're not being reaped appropriately. I tried attaching via strace to see if I could discern what the processes were being spawned for and what they were doing, but the output was very large. I'd need to filter to the appropriate syscalls, and thought I'd try to post this bug report before I spent too much more time on that approach.

It seems like that I'm seeing an increase of two zombie processes per invocation of the ps command detailed above. Maybe that's a hint of what's happening?

I'd be happy to try other approaches that you suggest if it would help fix the issue.

Icon support

Screenshot_20200829_123927
I like tide. I want to switch to fish completely but I need those icons from powerlevel10k. Please add them.

I am using vi mode and the green I and red N show up above so I have a three line prompt

Fish version 3.1.2 on Ubuntu 18

I switched to tide because pure was not handling tmux correctly (the prompt kept printing weird characters) by the way you should advertise this as a feature that it plays nice with tmux.

However below you can see it causes a three line prompt - how can I make that go away but keep vi mode?

Pure handles vi mode by switching reversing the direction of the arrow depending on if youre in insert mode or normal mode - its really minimal and I like it.

Is it possible to add something like this?

image

default setting

What would I need to set to get these icons to to look right?

Also, is there a default setting?

Screen Shot 2020-11-29 at 10 50 42 AM

Screen Shot 2020-11-29 at 10 58 58 AM

Thank you and thanks for sharing this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.