Repository: dbt-labs/dbt-core

Issue:
[CT-1204] [Feature] Add shorthand for `--full-refresh` flag
### Is this your first time submitting a feature request?

- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

### Describe the feature

I write (and misspell!) `--full-refresh` a whole heck of a lot during dbt development. Would love to add a shorthand for that flag in the sameway that `--select` can be reduced to `-s`, `--target` can be reduced to `-t` etc. 

### Describe alternatives you've considered

Keeping on keeping on! There's a tradeoff here between clarity and brevity, so i understand we probably don't want to make every single flag shorthand!

### Who will this benefit?

keyboard users

### Are you interested in contributing this feature?

Yes!

### Anything else?

_No response_


Discussion:
I like it...perhaps we can tackle in the `click` work for 1.4? @iknox-fa how easy would this be? should we wait, or do this now?  
I thought that shorthand params needed to be 1 char so we could chain them together, e.g. `dbt -x -q run` is the same as doing `dbt -xq run`(and it is the same behavior for most CLI tools, like `ls -la` being the same as `ls -l -a`).

Did we check what happens now that we have a shorthand param with 2 chars?
@b-per Whoa, I didn't know about that! It isn't something I checked (or thought about) when we were deciding between `-fr` and a single-character version (`-f`).

Links I quickly found:
- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
- https://stackoverflow.com/questions/67145068/does-click-support-bunching-short-options-together (`click` is our new in-development CLI, replacing the current one based on `argparse`)

> Each option name should be a single alphanumeric character (the alnum character classification) from the portable character set.

If there's a lot of additional utility in doing this, we could swap to the single char version (`-f`)
whoa who knew! Definitely open to changing it! I have never chained flags together as i'm sure you can tell
[This is](https://softwareengineering.stackexchange.com/questions/70357/command-line-options-style-posix-or-what) another link mentioning that from the POSIX standpoint short params should be 1 char. Not sure if we are forcing ourselves to be POSIX compliant though.

I thing that `-f` is a pretty good candidate instead of `-fr`.
Despite my love for the very memeable `-fr`, I am convinced
may the `-f` be with you both!

wanna PR it up? (and edit the description here: https://github.com/dbt-labs/docs.getdbt.com/issues/2055)?
on it!

Resolving patch:
diff --git a/core/dbt/cli/params.py b/core/dbt/cli/params.py
--- a/core/dbt/cli/params.py
+++ b/core/dbt/cli/params.py
@@ -97,7 +97,7 @@
 
 full_refresh = click.option(
     "--full-refresh",
-    "-fr",
+    "-f",
     envvar="DBT_FULL_REFRESH",
     help="If specified, dbt will drop incremental models and fully-recalculate the incremental table from the model definition.",
     is_flag=True,
diff --git a/core/dbt/main.py b/core/dbt/main.py
--- a/core/dbt/main.py
+++ b/core/dbt/main.py
@@ -618,7 +618,7 @@ def _add_table_mutability_arguments(*subparsers):
     for sub in subparsers:
         sub.add_argument(
             "--full-refresh",
-            "-fr",
+            "-f",
             action="store_true",
             help="""
             If specified, dbt will drop incremental models and


Test patch:
diff --git a/tests/functional/materializations/test_runtime_materialization.py b/tests/functional/materializations/test_runtime_materialization.py
--- a/tests/functional/materializations/test_runtime_materialization.py
+++ b/tests/functional/materializations/test_runtime_materialization.py
@@ -138,20 +138,20 @@ def test_full_refresh(
         project,
     ):
         # initial full-refresh should have no effect
-        results = run_dbt(["run", "-fr"])
+        results = run_dbt(["run", "-f"])
         assert len(results) == 3
 
         check_relations_equal(project.adapter, ["seed", "view", "incremental", "materialized"])
 
         # adds one record to the incremental model. full-refresh should truncate then re-run
         project.run_sql(invalidate_incremental_sql)
-        results = run_dbt(["run", "-fr"])
+        results = run_dbt(["run", "-f"])
         assert len(results) == 3
         check_relations_equal(project.adapter, ["seed", "incremental"])
 
         project.run_sql(update_sql)
 
-        results = run_dbt(["run", "-fr"])
+        results = run_dbt(["run", "-f"])
         assert len(results) == 3
 
         check_relations_equal(project.adapter, ["seed", "view", "incremental", "materialized"])
@@ -181,7 +181,7 @@ def test_delete_dbt_tmp_relation(
         project.run_sql(create_incremental__dbt_tmp_sql)
         assert len(results) == 1
 
-        results = run_dbt(["run", "--model", "incremental", "-fr"])
+        results = run_dbt(["run", "--model", "incremental", "-f"])
         assert len(results) == 1
 
         check_table_does_not_exist(project.adapter, "incremental__dbt_tmp")