Closed ngmoviedo closed 3 years ago
I've browsed the code a bit and I've noticed that setting pcount
to 0 at startup in fish_prompt.fish solves the issue with the first line. I don't know how general this issue is, though, and I guess this may be a dirty hack for my system.
The greeting is still nowhere to be seen.
Thanks for the info. I've been trying to figure out why some systems start the pcount at 2 rather than 1. I've had this issue in WSL, but not all distros show this.
Can you run the "set" command in the fish shell and see what variables are currently set? For the greeting, look for "budspencer_nogreeting". This will just ensure that the variable hasn't been set for all shell sessions.
Sorry, I forgot to mention that I solved the problem with the greeting. It had something to do with the script checking if the LOGIN
environment variable was set. I removed that line in the forked version I'm using now. See here.
As for the pcount
variable, I had to set it back to 1 after one of the last fish updates. I'm not sure what was changed, though.
In any case, here's the output of set
:
BAT_THEME Dracula CMD_DURATION 0 COLORTERM truecolor COLUMNS 94 DBUS_SESSION_BUS_ADDRESS unix:path=/run/user/1000/bus DESKTOP_STARTUP_ID i3/i3-sensible-terminal/542-7-desktop-arch_TIME1639670 DISPLAY :0 EDITOR /usr/bin/vi FISH_VERSION 3.2.1 GTK3_MODULES xapp-gtk3-module GTK_MODULES canberra-gtk-module HIGHLIGHT_STYLE /usr/share/highlight/themes/base16/dracula.theme HOME /home/nicolas I3SOCK /run/user/1000/i3/ipc-socket.542 IFS \n\ \t KITTY_WINDOW_ID 1 LANG en_US.UTF-8 LANGUAGE en_US.UTF-8 LC_ADDRESS es_ES.UTF-8 LC_COLLATE C LC_IDENTIFICATION es_ES.UTF-8 LC_MEASUREMENT es_ES.UTF-8 LC_MESSAGES en_US.UTF-8 LC_MONETARY es_ES.UTF-8 LC_NAME es_ES.UTF-8 LC_PAPER es_ES.UTF-8 LC_TELEPHONE es_ES.UTF-8 LC_TIME es_ES.UTF-8 LINES 46 LOGIN nicolas LOGNAME nicolas MAIL /var/spool/mail/nicolas MANPAGER 'nvimpager' '-p' PAGER 'nvimpager' '-p' PATH '/usr/local/sbin' '/usr/local/bin' '/usr/bin' '/usr/bin/s… PWD /home/nicolas QT_QPA_PLATFORMTHEME qt5ct SHELL /usr/bin/fish SHLVL 2 TERM xterm-kitty TERMCMD kitty TERMINAL kitty TERMINFO /usr/lib/kitty/terminfo USER nicolas WINDOWID 62914571 WINDOWPATH 1 XAUTHORITY /home/nicolas/.Xauthority XDG_DATA_DIRS /home/nicolas/.local/share/flatpak/exports/share:/var/lib/fl… XDG_RUNTIME_DIR /run/user/1000 XDG_SEAT seat0 XDG_SESSION_CLASS user XDG_SESSION_ID 1 XDG_SESSION_TYPE tty XDG_VTNR 1 ZO_CMD zo Z_CMD z Z_DATA /home/nicolas/.local/share/z/data Z_DATA_DIR /home/nicolas/.local/share/z ZEXCLUDE '^/home/nicolas$' set _Z_DATA /home/nicolas/.local/share/z/data fish_active_key_bindings fish_vi_key_bindings fish_added_user_paths fish_bin_dir /usr/bin fish_config_dir /home/nicolas/.config/fish fish_config_interactive_done fish_data_dir /usr/share/fish fish_help_dir /usr/share/doc/fish __fish_initialized 3100 fish_sysconf_dir /etc/fish fish_user_data_dir /home/nicolas/.local/share/fish __tf_func 'function tf_alias -d "Correct your previous console comma… tf_vers 'The Fuck 3.30 using Python 3.9.1 and Fish Shell 3.1.2' _fish_abbr_chu checkupdates _fish_abbr_f fuck _fish_abbr_flu 'flatpak update' _fish_abbr_ga 'git add' _fish_abbr_ga2E 'git add .' _fish_abbr_gau 'git add -u' _fish_abbr_gcm 'git commit -m' _fish_abbr_gp 'git push' _fish_abbr_gpom 'git push origin master' _fish_abbr_gst 'git status' _fish_abbr_l less _fish_abbr_lsa 'ls -a' _fish_abbr_nv nvim _fish_abbr_ods 'onedrive --synchronize' _fish_abbr_pas 'sudo pacman -S' _fish_abbr_poff poweroff _fish_abbr_prns 'sudo pacman -Rns' _fish_abbr_pss 'pacman -Ss' _fish_abbr_psyu 'sudo pacman -Syu' _fish_abbr_rk reload-keys _fish_abbr_rwin reboot-windows _fish_abbr_sd sudo _fish_abbr_v vi _fish_abbr_vk vitty _fish_abbr_yqum 'yay -Qum' _fish_abbr_yss 'yay -Ss' _fish_abbr_ysyu 'yay -Syu' _fisher_dracula_2F_fish_files /home/nicolas/.config/fish/conf.d/dracula.fish _fisher_jethrokuan_2F_z_files '/home/nicolas/.config/fish/functions/z.fish' '/home/nico… _fisher_jorgebucaran_2F_autopair_2E_fish_files '/home/nicolas/.config/fish/functions/_autopair_backspace.fi… _fisher_jorgebucaran_2F_fisher_files '/home/nicolas/.config/fish/functions/fisher.fish' '/home/n… _fisher_jorgebucaran_2F_replay_2E_fish_files '/home/nicolas/.config/fish/functions/replay.fish' '/home/n… _fisher_ngmoviedo_2F_plugin_2D_sudope_files '/home/nicolas/.config/fish/functions/sudope.fish' '/home/n… _fisher_ngmoviedo_2F_theme_2D_budspencer_files '/home/nicolas/.config/fish/functions/dracula_budspencer.fis… _fisher_oh_2D_my_2D_fish_2F_plugin_2D_wttr_files '/home/nicolas/.config/fish/functions/moon.fish' '/home/nic… _fisher_plugins 'jorgebucaran/fisher' 'ngmoviedo/plugin-sudope' 'jethrokua… autopair_left '(' '[' '{' '"' ''' autopair_pairs '()' '[]' '{}' '""' '''' autopair_right ')' ']' '}' '"' ''' budspencer_colors '000000' '44475a' '6272a4' 'fdf6e3' '50fa7b' 'ffb86c' … budspencer_config /home/nicolas/.config/fish/budspencer_config.fish budspencer_current_bindmode_color 50fa7b budspencer_cursors '\033]12;#bd93f9\007' '\033]12;#50fa7b\007' '\033]12;#ff55… budspencer_day '000000' '333333' '666666' 'ffffff' 'ffff00' 'ff6600' … budspencer_night '000000' '083743' '445659' 'fdf6e3' 'b58900' 'cb4b16' … budspencer_nobell budspencer_nocmdhist 'c' 'd' 'll' 'ls' 'm' 's' budspencer_nogreeting budspencer_prompt_error budspencer_pwdstyle 'short' 'long' 'none' budspencer_session_current budspencer_sessions_active budspencer_sessions_active_pid budspencer_tmpfile /tmp/44808_budspencer_edit.fish cmd_hist cmd_hist_nosession cmd_hist_nosession dir_hist dir_hist_nosession dir_hist_nosession /home/nicolas dir_hist_val 1 fish_bind_mode insert fish_color_autosuggestion 6272a4 fish_color_command 8be9fd fish_color_comment 6272a4 fish_color_end ffb86c fish_color_error ff5555 fish_color_escape ff79c6 fish_color_keyword ff79c6 fish_color_normal f8f8f2 fish_color_operator 50fa7b fish_color_param bd93f9 fish_color_quote f1fa8c fish_color_redirection f8f8f2 fish_color_search_match --background=44475a fish_color_selection --background=44475a fish_complete_path '/home/nicolas/.config/fish/completions' '/etc/fish/complet… fish_cursor_unknown 'block' 'blink' fish_function_path '/home/nicolas/.config/fish/functions' '/etc/fish/functions… fish_greeting 'Welcome to fish, the friendly interactive shell' fish_handle_reflow 1 fish_key_bindings fish_vi_key_bindings fish_kill_signal 0 fish_pager_color_completion f8f8f2 fish_pager_color_description 6272a4 fish_pager_color_prefix 8be9fd fish_pager_color_progress 6272a4 fish_pid 44808 history 'set -e theme' set 'flatpak update' yay checkupdates checkup… hostname desktop-arch last_status 0 no_prompt_hist F pcount 1 pipestatus 0 prompt_hist pwd_hist_lock false pwd_style short readme_file /home/nicolas/.config/fish/functions/README_budspencer.md readme_file_fisher /home/nicolas/.config/fish/functions/README_budspencer.md readme_file_omf /themes/budspencer/functions/README_budspencer.md status 0 status_generation 0 sudope_sequence \e\e symbols_style symbols umask 0022 version 3.2.1
Great. Glad the first issue is fixed. As I said, I'm still trying to figure out what is going on with the pcount
variable. I do have a fix in my init.fish file that manually sets it to 0 as well for now while I try to resolve the issue.
As I see it, due to the variability among different systems and distributions, it may be difficult to find a definitive solution that addresses all possible situations. It may be a good idea to implement a way to let the user set the pcount
manually when it's not correct by default, and document it on the main README
.
I'm afraid I'm not fluent enough in fish right now and I don't have the time to implement it myself, but it doesn't sound too difficult.
Thanks for the feedback. I do think that the variability of different systems may cause this to be a recurring issue. I will likely add documentation about this issue in the README and test a few fixes that could help. Either way, having a documented fix in the README will address this.
Regarding the greeting and the LOGIN
environment variable, I can't reproduce the issue anymore. Maybe something was changed when updating relevant programs or the issue was due to a, now solved, misconfugarition on my part.
Maybe @clayauld would be interested in keeping the issue open until the pcount
fix is added to the README. If not, I guess this issue can be closed.
I'll keep the issue open until I update the README. I just haven't had time to do it yet with my busy schedule of late.
I'm probably doing something wrong, but I've recently installed budspencer and I've noticed that the line count starts always at 2. Also, there's no greeting, independently of the environment variable. I have installed and reinstalled using both Oh-My-Fish and Fisher getting the same result. Obviously the issue is minor, but I find it a bit annoying. This have been experienced in two different OSs. OS 1: Arch Linux (using kitty as terminal emulator) OS 2: Android 10 (using Termux)