I'm pretty certain this is some foible of my SSH client (RoyalTS for Windows) but, having just installed and changed to fish shell, my prompt is preceded by two dark-grey âŽ
characters.
It doesn't seem to do it in PuTTY, just in this particular client, which uses a Rebex plugin.
The fish FAQ talks about random characters and mentions a fish_title
function, which it tells you how to empty, but this does not seem to have made a difference.
I'm sure they are just some sort of mis-encoded control characters, but I'm just trying to work out what these two characters are, what they are for and how I might get rid of them.
Edit
As requested, the output of fish_prompt
hasn't changed since install, and is:
function fish_prompt --description 'Write out the prompt'
# Just calculate this once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
set -l color_cwd
set -l suffix
switch $USER
case root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
set suffix '#'
case '*'
set color_cwd $fish_color_cwd
set suffix '>'
end
echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
end
...and fish_prompt | xxd
:
0000000: 726f 6f74 4063 616e 6463 2d77 6230 3170 root@candc-wb01p
0000010: 2d6c 201b 5b33 316d 2f1b 5b33 306d 1b28 -l .[31m/.[30m.(
0000020: 421b 5b6d 2320 B.[m#
...and functions -an
:
# functions -an
., N_, _, __fish_append, __fish_bind_test1, __fish_bind_test2,
__fish_command_not_found_setup, __fish_commandline_test,
__fish_complete_abook_formats, __fish_complete_ant_targets,
__fish_complete_atool, __fish_complete_atool_archive_contents,
__fish_complete_aura, __fish_complete_bittorrent,
__fish_complete_cabal, __fish_complete_cd, __fish_complete_command,
__fish_complete_convert_options, __fish_complete_diff,
__fish_complete_directories, __fish_complete_file_url,
__fish_complete_ftp, __fish_complete_grep, __fish_complete_groups,
__fish_complete_list, __fish_complete_lpr, __fish_complete_lpr_option,
__fish_complete_ls, __fish_complete_lsusb, __fish_complete_man,
__fish_complete_mime, __fish_complete_pacman, __fish_complete_path,
__fish_complete_pgrep, __fish_complete_pids, __fish_complete_ppp_peer,
__fish_complete_proc, __fish_complete_python,
__fish_complete_service_actions, __fish_complete_setxkbmap,
__fish_complete_ssh, __fish_complete_subcommand,
__fish_complete_subcommand_root, __fish_complete_suffix,
__fish_complete_svn, __fish_complete_svn_diff, __fish_complete_tar,
__fish_complete_tex, __fish_complete_unrar, __fish_complete_users,
__fish_complete_vi, __fish_complete_wvdial_peers, __fish_complete_xsum,
__fish_config_interactive, __fish_contains_opt, __fish_crux_packages,
__fish_cursor_konsole, __fish_cursor_xterm,
__fish_default_command_not_found_handler, __fish_describe_command,
__fish_filter_ant_targets, __fish_filter_mime, __fish_git_prompt,
__fish_gnu_complete, __fish_hg_prompt, __fish_is_first_token,
__fish_is_token_n, __fish_list_current_token,
__fish_make_completion_signals, __fish_man_page, __fish_move_last,
__fish_no_arguments, __fish_not_contain_opt,
__fish_number_of_cmd_args_wo_opts, __fish_paginate, __fish_ports_dirs,
__fish_print_abook_emails, __fish_print_addresses,
__fish_print_arch_daemons, __fish_print_cmd_args,
__fish_print_cmd_args_without_options, __fish_print_commands,
__fish_print_debian_services, __fish_print_encodings,
__fish_print_filesystems, __fish_print_function_prototypes,
__fish_print_help, __fish_print_hostnames, __fish_print_interfaces,
__fish_print_lpr_options, __fish_print_lpr_printers,
__fish_print_lsblk_columns, __fish_print_make_targets,
__fish_print_mounted, __fish_print_packages,
__fish_print_service_names, __fish_print_svn_rev, __fish_print_users,
__fish_print_xdg_mimeapps, __fish_print_xdg_mimetypes,
__fish_print_xrandr_modes, __fish_print_xrandr_outputs,
__fish_print_xwindows, __fish_prt_no_subcommand, __fish_prt_packages,
__fish_prt_ports, __fish_prt_use_package, __fish_prt_use_port,
__fish_pwd, __fish_reconstruct_path, __fish_reload_key_bindings,
__fish_repaint, __fish_repaint_root, __fish_restore_status,
__fish_seen_subcommand_from, __fish_systemctl_automounts,
__fish_systemctl_devices, __fish_systemctl_mounts,
__fish_systemctl_scopes, __fish_systemctl_service_paths,
__fish_systemctl_services, __fish_systemctl_slices,
__fish_systemctl_snapshots, __fish_systemctl_sockets,
__fish_systemctl_swaps, __fish_systemctl_targets,
__fish_systemctl_timers, __fish_test_arg, __fish_urlencode,
__fish_use_subcommand, __fish_winch_handler, __terlar_git_prompt, abbr,
alias, cd, contains_seq, cp, delete-or-exit, dirh, dirs,
down-or-search, eval, export, fish_config, fish_default_key_bindings,
fish_indent, fish_mode_prompt, fish_prompt, fish_sigtrap_handler,
fish_update_completions, fish_vi_cursor, fish_vi_key_bindings,
fish_vi_mode, funced, funcsave, grep, help, history, hostname, isatty,
la, ll, ls, man, math, mcd, mimedb, mv, nextd, nextd-or-forward-word,
open, popd, prevd, prevd-or-backward-word, prompt_pwd, psub, pushd, rm,
seq, setenv, sgrep, trap, type, umask, up-or-search, vared,
.profile
(.bashrc
,.bash_profile
,.login
, etc.) which sets the prompt and has embedded control characters?~/.config/fish/*
-- would fish even use the bash-based ones?functions fish_prompt
?