# Setting up dfw command completion

This page describes how to enable `dfw` command completion, which extends Bash command-line completion to the `dfw` command’s parameters. For examples of using `dfw` command completion, see [Completing dfw commands using the &lt;tab> key](cdf-the-deployment-framework-command-utility-dfw.md#completing-dfw-commands-using-the-tab-key).

The script that enables `dfw` command completion also sets an environment variable that is required by Caplin’s `logcat` command in some circumstances. See [View packet logs using logcat: Requirements](../datasource/datasource-view-packet-logs-using-logcat.md#requirements).

## Requirements

Deployment Framework 6.2 or later.

## Enabling dfw command completion

You can enable dfw command completion for your current session only, or all future sessions:

* [Enable for your current session](#enable-for-your-current-session)
* [Enable for your future sessions](#enable-for-all-future-sessions)
* [Enable for all users' future sessions](#enable-for-all-users-future-sessions)

### Enable for your current session

To enable dfw command completion for the current session only, enter the command below from the root directory of your Deployment Framework.

```
$ source .dfw-completion
```

**📌 NOTE**\
If running the script above does not enable dfw command completion, try executing it in a new Bash shell. In some versions of Bash, if Bash filename completion is used with the `dfw` command before sourcing the `.dfw-completion` file, then Bash filename completion remains bound to the `dfw` command for the duration of the shell session.

### Enable for all future sessions

To enable dfw command completion for your future sessions:

1. Copy the file `.dfw-completion` from the root directory of your Deployment Framework into your home directory
2. Add the following line to `~/.bash_profile`

   ```
   . ~/.dfw-completion
   ```

**📌 NOTE**\
When you upgrade the Deployment Framework, the new release may include an updated version of the `.dfw-completion` script. Copy the new version of the `.dfw-completion` script to the appropriate directory to ensure command completion continues to work correctly.

### Enable for all users' future sessions

To enable dfw command completion for all users’s future sessions, copy the file `.dfw-completion` from the root directory of your Deployment Framework to the `/etc/bash_completion.d` directory.

If your Linux distribution does not have a `/etc/bash_completion.d` directory, copy the file to `/etc/profile.d` instead.

If your Linux distribution has neither a `/etc/bash_completion.d` directory nor a `/etc/profile.d` directory, consult your system administrator.

**📌 NOTE**\
When you upgrade the Deployment Framework, the new release may include an updated version of the `.dfw-completion` script. Copy the new version of the `.dfw-completion` script to the appropriate directory to ensure command completion continues to work correctly.
