title: Can you help me translate this to ksh
body: <p>I use to put the following lines in my <code>bashrc</code> but I cannot use bash as a login shell anymore.
  My login shell is now ksh. When I put this in my .profile file and source it I get an error from ksh.
  How should I modify it such that it works ?</p>
  
  <pre><code>if [ "x$DISPLAY" == "x" ]                                                                        
  then                                                                                             
      function tvim(){ tmux new-session "vim $@" ; }                                               
  else                                                                                             
      function tvim(){ tmux -2 new-session "TERM=screen-256color vim $@" ; }                       
  fi 
  </code></pre>
  
  <hr>
  
  <p>.profile</p>
  
  <pre><code>loginshell=1
  SH_LEVEL=0
  export ENV=$HOME/.envfile
  export PROFILE_SETTINGS_FILE="$PROFILE_SETTINGS_FILE:~/.profile"
  </code></pre>
  
  <hr>
  
  <p><code>.envfile</code> : A lot of env variables definition I cannot show and bash on the last line</p>
  
  <hr>
  
  <p><code>.bashrc</code></p>
  
  <pre><code>if [ "x$DISPLAY" == "x" ]                                                                        
  then                                                                                             
      function tvim(){ tmux new-session "vim $@" ; }                                               
  else                                                                                             
      function tvim(){ tmux -2 new-session "TERM=screen-256color vim $@" ; }                       
  fi 
  </code></pre>
  
  <hr>
  
  <p>I do not have a <code>.kshrc</code></p>