Interesting case. [[ being changed to [ has no unique solution, because obviously either can match.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–11 unchanged (11 lines)
12 # Install OS dependencies:
13 if installed apt-get; then
14 # Debian/Ubuntu:
15 sudo apt-get update -yy
16 sudo apt-get install -yy python-pip python-dev command-not-found python-gdbm
17
18 if [[ -n $(apt-cache search python-commandnotfound) ]]; then
19 # In case of different python versions:
20 sudo apt-get install -yy python-commandnotfound
21 fi
22 else
23 if installed brew; then
24 # OS X:
…lines 25–62 unchanged (38 lines)

After

…lines 1–11 unchanged (11 lines)
12 # Install OS dependencies:
13 if installed apt-get; then
14 # Debian/Ubuntu:
15 sudo apt-get update -yy
16 sudo apt-get install -yy python-pip python-dev command-not-found python-gdbm
17
18 if [ -n "$(apt-cache search python-commandnotfound)" ]; then
19 # In case of different python versions:
20 sudo apt-get install -yy python-commandnotfound
21 fi
22 else
23 if installed brew; then
24 # OS X:
…lines 25–62 unchanged (38 lines)

Before

program
comment "#!/bin/sh"
function_definition (+27 nodes collapsed)
function_definition
word "installed"
( "("
) ")"
compound_statement
{ "{"
redirected_statement
command
command_name
word "hash"
simple_expansion
$ "$"
variable_name "1"
file_redirect
file_descriptor "2"
> ">"
word "/dev/null"
} "}"
function_definition
word "install_thefuck"
( "("
) ")"
compound_statement
{ "{"
comment "# Install OS dependencies:"
if_statement
if "if"
command
command_name
word "installed"
word "apt-get"
; ";"
then "then"
comment "# Debian/Ubuntu:"
command
command_name
word "sudo"
word "apt-get"
word "update"
word "-yy"
command
command_name
word "sudo"
word "apt-get"
word "install"
word "-yy"
word "python-pip"
word "python-dev"
word "command-not-found"
word "python-gdbm"
if_statement
if "if"
test_command
[[ "[["
unary_expression
test_operator "-n"
command_substitution
$( "$("
command
command_name
word "apt-cache"
word "search"
word "python-commandnotfound"
) ")"
]] "]]"
; ";"
then "then"
comment "# In case of different python versions:"
command
command_name
word "sudo"
word "apt-get"
word "install"
word "-yy"
word "python-commandnotfound"
fi "fi"
else_clause (+37 nodes collapsed)
fi "fi"
comment "# thefuck requires fresh versions of setuptools and pip:"
command
command_name
word "sudo"
word "pip"
word "install"
word "-U"
word "pip"
word "setuptools"
command
command_name
word "sudo"
word "pip"
word "install"
word "-U"
word "thefuck"
comment "# Setup aliases:"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.bashrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.bashrc"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.bash_profile"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.bash_profile"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.zshrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.zshrc"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.config/fish/config.fish"
; ";"
then "then"
redirected_statement
command
command_name
word "thefuck"
word "--alias"
file_redirect
>> ">>"
word "~/.config/fish/config.fish"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.tcshrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval `thefuck --alias`'"
file_redirect
>> ">>"
word "~/.tcshrc"
fi "fi"
} "}"
command
command_name
word "install_thefuck"

After

program
comment "#!/bin/sh"
function_definition (+27 nodes collapsed)
function_definition
word "installed"
( "("
) ")"
compound_statement
{ "{"
redirected_statement
command
command_name
word "hash"
simple_expansion
$ "$"
variable_name "1"
file_redirect
file_descriptor "2"
> ">"
word "/dev/null"
} "}"
function_definition
word "install_thefuck"
( "("
) ")"
compound_statement
{ "{"
comment "# Install OS dependencies:"
if_statement
if "if"
command
command_name
word "installed"
word "apt-get"
; ";"
then "then"
comment "# Debian/Ubuntu:"
command
command_name
word "sudo"
word "apt-get"
word "update"
word "-yy"
command
command_name
word "sudo"
word "apt-get"
word "install"
word "-yy"
word "python-pip"
word "python-dev"
word "command-not-found"
word "python-gdbm"
if_statement
if "if"
test_command
[ "["
unary_expression
test_operator "-n"
string
" "\""
command_substitution
$( "$("
command
command_name
word "apt-cache"
word "search"
word "python-commandnotfound"
) ")"
" "\""
] "]"
; ";"
then "then"
comment "# In case of different python versions:"
command
command_name
word "sudo"
word "apt-get"
word "install"
word "-yy"
word "python-commandnotfound"
fi "fi"
else_clause (+37 nodes collapsed)
fi "fi"
comment "# thefuck requires fresh versions of setuptools and pip:"
command
command_name
word "sudo"
word "pip"
word "install"
word "-U"
word "pip"
word "setuptools"
command
command_name
word "sudo"
word "pip"
word "install"
word "-U"
word "thefuck"
comment "# Setup aliases:"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.bashrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.bashrc"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.bash_profile"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.bash_profile"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.zshrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval $(thefuck --alias)'"
file_redirect
>> ">>"
word "~/.zshrc"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.config/fish/config.fish"
; ";"
then "then"
redirected_statement
command
command_name
word "thefuck"
word "--alias"
file_redirect
>> ">>"
word "~/.config/fish/config.fish"
fi "fi"
if_statement
if "if"
command
command_name
word "should_add_alias"
word "~/.tcshrc"
; ";"
then "then"
redirected_statement
command
command_name
word "echo"
raw_string "'eval `thefuck --alias`'"
file_redirect
>> ">>"
word "~/.tcshrc"
fi "fi"
} "}"
command
command_name
word "install_thefuck"