Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fish integration script when commandline is empty #157778

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ end
function __vsc_cmd_executed --on-event fish_preexec
__vsc_esc C
__vsc_esc E (__vsc_escape_cmd "$argv")

# Creates a marker to indicate a command was run.
set --global _vsc_has_cmd
end


Expand Down Expand Up @@ -61,6 +64,14 @@ end
# Updates the current working directory.
function __vsc_update_cwd --on-event fish_prompt
__vsc_esc P "Cwd=$PWD"

# If a command marker exists, remove it.
# Otherwise, the commandline is empty and no command was run.
if set --query _vsc_has_cmd
set --erase _vsc_has_cmd
else
__vsc_cmd_clear
end
end

# Sent at the start of the prompt.
Expand Down