You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: shell_integration/fish
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
# along with this program; if not, write to the Free Software
13
13
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14
14
15
-
if begin; status --is-interactive; and not functions -q -- iterm2_status; and [ "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != screen ]; and [ "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != screen-256color ]; and [ "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != tmux-256color ]; and [ "$TERM" != dumb ]; and [ "$TERM" != linux ]; end
15
+
if begin; status --is-interactive; and not functions -q -- iterm2_status; and test "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != screen; and test "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != screen-256color; and test "$ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX""$TERM" != tmux-256color; and test "$TERM" != dumb; and test "$TERM" != linux; end
16
16
function iterm2_status
17
17
printf "\033]133;D;%s\007" $argv
18
18
end
@@ -30,7 +30,7 @@ if begin; status --is-interactive; and not functions -q -- iterm2_status; and [
30
30
# Tell terminal to create a mark at this location
31
31
function iterm2_preexec --on-event fish_preexec
32
32
# For other shells we would output status here but we can't do that in fish.
33
-
if [ "$TERM_PROGRAM" = "iTerm.app" ]
33
+
if test "$TERM_PROGRAM" = "iTerm.app"
34
34
printf "\033]133;C;\r\007"
35
35
else
36
36
printf "\033]133;C;\007"
@@ -67,7 +67,7 @@ if begin; status --is-interactive; and not functions -q -- iterm2_status; and [
67
67
68
68
iterm2_status $last_status
69
69
iterm2_write_remotehost_currentdir_uservars
70
-
if not functions iterm2_fish_prompt | grep -q iterm2_prompt_mark
70
+
if not functions iterm2_fish_prompt | string match -q "*iterm2_prompt_mark*"
71
71
iterm2_prompt_mark
72
72
end
73
73
return $last_status
@@ -112,7 +112,7 @@ if begin; status --is-interactive; and not functions -q -- iterm2_status; and [
112
112
if not set -q -g iterm2_hostname
113
113
# hostname -f is fast on macOS so don't cache it. This lets us get an updated version when
114
114
# it changes, such as if you attach to a VPN.
115
-
if [ (uname) != Darwin ]
115
+
if test (uname) != Darwin
116
116
set -g iterm2_hostname (hostname -f 2>/dev/null)
117
117
# some flavors of BSD (i.e. NetBSD and OpenBSD) don't have the -f option
118
118
if test $status -ne 0
@@ -122,5 +122,5 @@ if begin; status --is-interactive; and not functions -q -- iterm2_status; and [
0 commit comments