fish-shell/share/functions
Johannes Altmanninger 32ed0b80da Don't erase job status message when using multiline prompt
As explained in the parent commit, if we print things to the command line,
we move the cursor down before redrawing a multi-line prompt.  This is a
workaround to avoid erasing what we printed.

We forgot to do add this workaround to fish_job_summary. When running
`sleep 1 &` with a multiline prompt, the job exit notification is immediately
overwritten (most of the time).  This can be observed consistently on Linux
by waiting before redrawing:

    diff --git a/share/functions/fish_job_summary.fish b/share/functions/fish_job_summary.fish
    index a552fabbc..f457ee8e8 100644
    --- a/share/functions/fish_job_summary.fish
    +++ b/share/functions/fish_job_summary.fish
    @@ -52,6 +52,7 @@ function fish_job_summary -a job_id is_foreground cmd_line signal_or_end_name si
         string repeat \n --count=(math (count (fish_prompt)) - 1) >&2

         if test $is_foreground -eq 0; and test $signal_or_end_name != STOPPED
    +        sleep 1
             commandline -f repaint
         end
     end

Move the cursor down to work around this. In future, we could avoid calling
fish_prompt.  Also, this solution add an extra blank lines before the next
prompt.  With a real fix, we could get rid of that. Even worse, sometimes
there are two blank lines instead of one (for a two-line prompt).

Fixes #8817
2022-04-09 22:33:23 +02:00
..
__fish_any_arg_in.fish completions/git: some improvements 2019-10-29 19:13:31 +01:00
__fish_anypython.fish anypython: Try supported numbered python3 versions 2020-05-10 22:49:25 +02:00
__fish_append.fish Don't use abbreviated long options 2020-09-19 11:47:41 +02:00
__fish_apropos.fish Hide whatis database building from the user (#8310) 2021-09-23 10:59:44 +02:00
__fish_argcomplete_complete.fish Run fish_indent on share/**.fish 2021-08-01 18:59:45 +02:00
__fish_cancel_commandline.fish Speed up default ^C action considerably 2020-06-29 19:41:33 -05:00
__fish_commandline_is_singlequoted.fish Also fix tokenizer_state in bracketed paste path 2021-04-20 15:29:28 +02:00
__fish_complete_atool_archive_contents.fish
__fish_complete_bittorrent.fish added descriptions to __fish_print_addresses 2021-03-08 17:47:29 +01:00
__fish_complete_blockdevice.fish __fish_complete_blockdevice: Default to /dev 2020-12-11 23:09:16 +01:00
__fish_complete_cd.fish Revert "Fix cd completions if a directory exists in $CDPATH and $PWD" 2017-10-16 19:33:38 +02:00
__fish_complete_clang.fish Run fish_indent on share/**.fish 2020-08-17 17:40:28 +02:00
__fish_complete_command.fish Complete empty subcomands consistently 2019-11-05 09:05:46 +01:00
__fish_complete_convert_options.fish Don't use abbreviated long options 2020-09-19 11:47:41 +02:00
__fish_complete_directories.fish Don't use abbreviated long options 2020-09-19 11:47:41 +02:00
__fish_complete_docutils.fish Use complete --keep-order with __fish_complete_suffix to prioritize files with matching suffixes 2020-12-23 19:14:10 +01:00
__fish_complete_ftp.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_complete_gpg_key_id.fish completions/gpg: list only secret for gpg options that manage secret keys 2022-02-19 13:48:20 +01:00
__fish_complete_gpg_user_id.fish completions/gpg: list only secret for gpg options that manage secret keys 2022-02-19 13:48:20 +01:00
__fish_complete_gpg.fish completions/gpg: list only secret for gpg options that manage secret keys 2022-02-19 13:48:20 +01:00
__fish_complete_group_ids.fish Complete IDs for unix users and groups that start with _ 2020-03-10 20:56:45 +01:00
__fish_complete_groups.fish dogfood string split -f 2020-04-20 22:39:48 +02:00
__fish_complete_job_pids.fish
__fish_complete_list.fish Don't use abbreviated long options 2020-09-19 11:47:41 +02:00
__fish_complete_lpr_option.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_complete_lpr.fish Ensure short option description is not overridden 2022-02-02 18:19:15 -08:00
__fish_complete_man.fish Fix man completion for BSD's mandoc 2021-09-21 12:34:21 +02:00
__fish_complete_mount_opts.fish Run fish_indent on all non-test .fish files 2021-11-23 09:49:45 +01:00
__fish_complete_mysql.fish Use test command instead of bracket command 2021-11-26 16:55:50 -08:00
__fish_complete_netcat.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_complete_path.fish __fish_complete_path: guard against non-matching input 2020-12-12 08:22:45 +01:00
__fish_complete_pg_database.fish Improve psql completions and add some related commands (#6620) 2020-02-28 11:16:41 +01:00
__fish_complete_pg_user.fish Improve psql completions and add some related commands (#6620) 2020-02-28 11:16:41 +01:00
__fish_complete_pgrep.fish Rewrite __fish_complete_proc 2018-11-22 15:23:05 +01:00
__fish_complete_pids.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_complete_ppp_peer.fish
__fish_complete_proc.fish Remove unused --inherit-variable 2020-04-21 21:11:26 +02:00
__fish_complete_ssh.fish improved SSH completions 2021-03-20 21:17:53 +01:00
__fish_complete_subcommand.fish __fish_complete_subcommand: (re)move confusing comment 2021-08-10 21:01:39 +02:00
__fish_complete_suffix.fish __fish_complete_suffix: complete all files, but sort files with matching suffix first 2020-12-23 19:14:10 +01:00
__fish_complete_user_at_hosts.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_complete_user_ids.fish Complete IDs for unix users and groups that start with _ 2020-03-10 20:56:45 +01:00
__fish_complete_users.fish Use the new string split --fields feature 2020-04-12 14:01:21 -07:00
__fish_complete_wireshark.fish Fix completion errors for tshark when running as root (#7858) 2021-03-23 20:40:44 +01:00
__fish_complete_zfs_mountpoint_properties.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_complete_zfs_pools.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_complete_zfs_ro_properties.fish completion helper functions: do not use gettext 2020-03-06 22:23:50 +01:00
__fish_complete_zfs_rw_properties.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_complete_zfs_write_once_properties.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_config_interactive.fish Add kitty to __update_cwd_osc 2022-03-17 18:17:42 +01:00
__fish_contains_opt.fish
__fish_crux_packages.fish dogfood string split -f 2020-04-20 22:39:48 +02:00
__fish_cursor_1337.fish
__fish_cursor_konsole.fish
__fish_cursor_xterm.fish
__fish_describe_command.fish __fish_describe_command: Add missing -- 2021-03-10 07:17:23 +01:00
__fish_first_token.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_git_prompt.fish Move __fish_git_prompt -> fish_git_prompt 2019-02-10 14:44:50 +01:00
__fish_gnu_complete.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_hg_prompt.fish Rename __fish_hg_prompt -> fish_hg_prompt 2019-02-10 14:44:50 +01:00
__fish_is_first_arg.fish __fish_is_first_arg: only look at current process 2021-06-15 03:38:52 +02:00
__fish_is_first_token.fish Make __fish_is_nth_token and __fish_nth_token private again 2022-02-13 10:45:38 +01:00
__fish_is_git_repository.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_is_nth_token.fish Make __fish_is_nth_token and __fish_nth_token private again 2022-02-13 10:45:38 +01:00
__fish_is_switch.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_is_token_n.fish Make __fish_is_nth_token and __fish_nth_token private again 2022-02-13 10:45:38 +01:00
__fish_is_zfs_feature_enabled.fish Fix zfs completions under FreeBSD 2018-05-26 12:20:04 -05:00
__fish_list_current_token.fish Simplify cursor movement for multi-line prompts before repainting 2022-04-09 22:33:23 +02:00
__fish_make_cache_dir.fish Run fish_indent on share/**.fish 2021-02-08 07:31:33 +01:00
__fish_make_completion_signals.fish Run fish_indent on share/**.fish 2021-08-01 18:59:45 +02:00
__fish_man_page.fish Skip more leading commands in __fish_man_page (#8612) 2022-01-08 13:50:31 +01:00
__fish_md5.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
__fish_move_last.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_no_arguments.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_not_contain_opt.fish
__fish_npm_helper.fish [npm/yarn] Add support for namespaced packages 2020-10-21 22:26:52 -05:00
__fish_nth_token.fish Make __fish_is_nth_token and __fish_nth_token private again 2022-02-13 10:45:38 +01:00
__fish_number_of_cmd_args_wo_opts.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_paginate.fish Provide functions to toggle commandline prefix/suffix 2021-06-23 20:51:20 +02:00
__fish_parent_directories.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_prepend_sudo.fish Provide functions to toggle commandline prefix/suffix 2021-06-23 20:51:20 +02:00
__fish_prev_arg_in.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_preview_current_file.fish new function __fish_preview_current_file to open file at the cursor in pager 2020-04-07 22:30:05 +02:00
__fish_print_addresses.fish added descriptions to __fish_print_addresses 2021-03-08 17:47:29 +01:00
__fish_print_apt_packages.fish __fish_print_apt_packages: stringify 2022-01-06 23:55:18 +08:00
__fish_print_cmd_args_without_options.fish functions/__fish_print_cmd_args_without_options: Stringify 2019-01-26 19:20:16 +01:00
__fish_print_cmd_args.fish
__fish_print_commands.fish Fix help thinking some docs are commands 2021-11-25 21:25:46 +01:00
__fish_print_debian_apache_confs.fish
__fish_print_debian_apache_mods.fish
__fish_print_debian_apache_sites.fish
__fish_print_encodings.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_print_eopkg_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_filesystems.fish add ffs to known filesystems 2017-12-12 19:18:47 +01:00
__fish_print_gpg_algo.fish refactor gpg.fish completions 2019-10-29 19:07:35 +01:00
__fish_print_groups.fish Added completions/translations for zfs and zpool 2017-12-21 16:39:06 +01:00
__fish_print_help.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
__fish_print_hostnames.fish Run fish_indent on share/**.fish 2020-08-17 17:40:28 +02:00
__fish_print_interfaces.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_print_lpr_options.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_print_lpr_printers.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_print_modules.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_print_mounted.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
__fish_print_opkg_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_pacman_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_pacman_repos.fish functions/__fish_print_pacman_repos.fish: fix 2019-10-26 18:11:29 +02:00
__fish_print_pipestatus.fish Fix typo in __fish_print_pipestatus 2021-03-07 12:51:57 +01:00
__fish_print_pkg_add_packages.fish __fish_print_packages: Break apart 2020-12-22 17:10:02 +01:00
__fish_print_pkg_packages.fish Run fish_indent on share/**.fish 2021-02-08 07:31:33 +01:00
__fish_print_port_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_portage_available_pkgs.fish Rename functions to match others 2020-02-17 09:55:05 +01:00
__fish_print_portage_installed_pkgs.fish Rename functions to match others 2020-02-17 09:55:05 +01:00
__fish_print_portage_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_portage_repository_paths.fish Rename functions to match others 2020-02-17 09:55:05 +01:00
__fish_print_rpm_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_service_names.fish Remove use of caret redirection from share/* 2018-04-01 13:42:38 -07:00
__fish_print_svn_rev.fish
__fish_print_users.fish
__fish_print_VBox_vms.fish
__fish_print_windows_drives.fish Run fish_indent over new Windows completions 2022-01-26 22:02:23 -08:00
__fish_print_windows_users.fish Run fish_indent over new Windows completions 2022-01-26 22:02:23 -08:00
__fish_print_xbps_packages.fish __fish_print_packages: Extract the rest 2020-12-22 17:10:02 +01:00
__fish_print_xdg_applications_directories.fish Fix xdg mimetype completion 2020-01-22 16:33:56 +01:00
__fish_print_xdg_mimetypes.fish Fix xdg mimetype completion 2020-01-22 16:33:56 +01:00
__fish_print_xwindows.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_print_zfs_snapshots.fish Reformat 2020-11-22 14:39:48 +01:00
__fish_ps.fish __fish_ps: Use builtin realpath 2020-04-21 21:11:26 +02:00
__fish_pwd.fish __fish_pwd: Just always define the cygwin version 2021-04-19 18:58:00 +02:00
__fish_seen_argument.fish Run fish_indent over new Windows completions 2022-01-26 22:02:23 -08:00
__fish_seen_subcommand_from.fish
__fish_set_locale.fish Also read /etc/default/locale for the locale 2021-12-18 08:57:22 +01:00
__fish_shared_key_bindings.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
__fish_should_complete_switches.fish Reformat all files 2019-05-05 12:09:25 +02:00
__fish_svn_prompt.fish Rename __fish_svn_prompt -> fish_svn_prompt 2019-02-10 14:44:50 +01:00
__fish_systemctl_services.fish dogfood string split -f 2020-04-20 22:39:48 +02:00
__fish_systemctl.fish systemctl completions: Use --plain where appropriate 2020-04-18 11:11:27 +02:00
__fish_systemd_machine_images.fish
__fish_systemd_machines.fish Revert "Move __fish_systemd_machines into machinectl completion script" 2019-12-09 21:07:21 +01:00
__fish_toggle_comment_commandline.fish Split history commands in __fish_toggle_comment_commandline 2021-06-23 22:46:09 +02:00
__fish_tokenizer_state.fish __fish_tokenizer_state: replace "str" with "state" (#8550) 2021-12-13 02:42:16 -08:00
__fish_use_subcommand.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__fish_vcs_prompt.fish Rename __fish_vcs_prompt -> fish_vcs_prompt 2019-02-10 14:44:50 +01:00
__fish_whatis_current_token.fish Simplify cursor movement for multi-line prompts before repainting 2022-04-09 22:33:23 +02:00
__fish_whatis.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
__terlar_git_prompt.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
_validate_int.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
abbr.fish Fix abbr return status 2021-11-11 16:46:23 +01:00
alias.fish Don't use a function variable in alias 2022-04-08 16:33:27 +02:00
cd.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
cdh.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
contains_seq.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
diff.fish Colourise diff(1) output, if supported (#7308) 2020-09-04 18:43:09 +02:00
dirh.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
dirs.fish Fix dirs returns false when $dirstack is empty 2021-08-09 12:43:03 +02:00
down-or-search.fish Shorten more. 2022-01-27 16:21:22 -08:00
edit_command_buffer.fish Prepend command to cat 2021-09-12 22:11:01 +08:00
export.fish Fix export returning 1 on success 2017-10-01 01:11:17 -07:00
fish_add_path.fish fish_add_path: Explicitly set $PATH as global 2021-06-23 20:01:58 +02:00
fish_breakpoint_prompt.fish
fish_clipboard_copy.fish fish_clipboard_{copy,paste}: only use xsel/xclip if $DISPLAY is set 2021-07-23 20:55:07 +02:00
fish_clipboard_paste.fish Redirect stderr of xclip to /dev/null 2021-12-15 22:30:12 +08:00
fish_command_not_found.fish Move executable-check to C++ 2022-03-31 15:16:01 +02:00
fish_commandline_append.fish Provide functions to toggle commandline prefix/suffix 2021-06-23 20:51:20 +02:00
fish_commandline_prepend.fish Provide functions to toggle commandline prefix/suffix 2021-06-23 20:51:20 +02:00
fish_config.fish fish_config: Set colors that aren't set in the theme to empty 2022-03-20 17:04:28 +01:00
fish_default_key_bindings.fish Shorten more. 2022-01-27 16:21:22 -08:00
fish_default_mode_prompt.fish Shorten more. 2022-01-27 16:21:22 -08:00
fish_git_prompt.fish fish_git_prompt: be careful about git config 2021-12-30 13:11:04 -08:00
fish_greeting.fish fish_greeting: show private mode message if $fish_greeting is empty list 2021-05-05 18:53:51 +02:00
fish_hg_prompt.fish fish_hg_prompt should return 1 when not in a mercurial directory 2020-04-19 04:24:28 +02:00
fish_hybrid_key_bindings.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
fish_indent.fish Rename $FISH_VERSION back to the original $version. 2017-10-14 08:33:02 -07:00
fish_is_root_user.fish Add a function to check if the user is root. 2020-06-26 21:25:13 +02:00
fish_job_summary.fish Don't erase job status message when using multiline prompt 2022-04-09 22:33:23 +02:00
fish_key_reader.fish Fix fish_key_reader wrapper check 2021-09-05 21:42:35 +02:00
fish_mode_prompt.fish
fish_opt.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
fish_print_git_action.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
fish_print_hg_root.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
fish_prompt.fish fish_prompt: clarify comment about carried-over status (#8335) 2021-10-05 21:01:13 +02:00
fish_status_to_signal.fish Shorten more. 2022-01-27 16:21:22 -08:00
fish_svn_prompt.fish Use test command instead of bracket command 2021-11-26 16:55:50 -08:00
fish_title.fish Use old-school "()" command substitution in fish_title 2022-03-14 18:15:06 +01:00
fish_update_completions.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
fish_vcs_prompt.fish Shorten more. 2022-01-27 16:21:22 -08:00
fish_vi_cursor.fish Run fish_indent on all non-test .fish files 2021-11-23 09:49:45 +01:00
fish_vi_key_bindings.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
funced.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
funcsave.fish Put funcsave long option back 2022-03-24 20:11:39 +01:00
grep.fish
help.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
history.fish history: Add missing "--" for delete 2022-04-03 21:02:15 +02:00
isatty.fish Use the newly fixed test -t in isatty 2020-09-16 21:02:59 +02:00
la.fish Use --almost-all in la function 2021-12-02 02:22:40 -08:00
ll.fish Remove completion files for ls aliases; just use function --wraps 2021-04-16 17:40:55 +02:00
ls.fish Reapply -F 2021-09-24 18:25:27 +02:00
man.fish man: Remove useless dirname call 2021-05-14 21:49:53 +02:00
N_.fish Fix extra or missing newlines at end of file in our fish scripts 2020-08-09 23:53:46 +02:00
nextd.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
open.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
popd.fish
prevd.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
prompt_hostname.fish prompt_* functions: shorten their descriptions 2022-01-22 20:06:37 -08:00
prompt_login.fish prompt_* functions: shorten their descriptions 2022-01-22 20:06:37 -08:00
prompt_pwd.fish prompt_* functions: shorten their descriptions 2022-01-22 20:06:37 -08:00
psub.fish share/functions: account for the possibility of mktemp failure. 2020-11-14 15:57:42 +01:00
pushd.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
realpath.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
seq.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
setenv.fish
suspend.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
trap.fish Some more precautionary uses of set --local 2020-05-15 21:35:48 +02:00
umask.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
up-or-search.fish Shorten more. 2022-01-27 16:21:22 -08:00
vared.fish Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00