.. _How can I open a file in DVT from the terminal?:

How can I open a file in DVT from the terminal?
===============================================

You can use the :ref:`Command Line Interface` like this:

.. code-block:: bash

    dvt_cli.sh -workspace ~/dvt_workspace openFile $(readlink -f my/file.sv)

The command can be shortened by defining this alias in your ``~/.cshrc``:

.. code-block:: bash

    alias dvtopen 'dvt_cli.sh -workspace ~/dvt_workspace openFile `readlink -f \!*`'

or by defining this function in your ``~/.bashrc``:

.. code-block:: bash

    dvtopen () { dvt_cli.sh -workspace ~/dvt_workspace openFile $(readlink -f $1); }

Then the command gets much shorter:

.. code-block:: bash

    dvtopen my/file.sv
