mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Reset An Option Back To Its Default Value as a tmux til
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||||
|
|
||||||
_983 TILs and counting..._
|
_984 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -883,6 +883,7 @@ _983 TILs and counting..._
|
|||||||
- [Pane Killer](tmux/pane-killer.md)
|
- [Pane Killer](tmux/pane-killer.md)
|
||||||
- [Reclaiming The Entire Window](tmux/reclaiming-the-entire-window.md)
|
- [Reclaiming The Entire Window](tmux/reclaiming-the-entire-window.md)
|
||||||
- [Rename The Current Session](tmux/rename-the-current-session.md)
|
- [Rename The Current Session](tmux/rename-the-current-session.md)
|
||||||
|
- [Reset An Option Back To Its Default Value](tmux/reset-an-option-back-to-its-default-value.md)
|
||||||
- [Show The Current Value For An Option](tmux/show-the-current-value-for-an-option.md)
|
- [Show The Current Value For An Option](tmux/show-the-current-value-for-an-option.md)
|
||||||
- [Swap Split Panes](tmux/swap-split-panes.md)
|
- [Swap Split Panes](tmux/swap-split-panes.md)
|
||||||
- [Switch To A Specific Session And Window](tmux/switch-to-a-specific-session-and-window.md)
|
- [Switch To A Specific Session And Window](tmux/switch-to-a-specific-session-and-window.md)
|
||||||
|
|||||||
32
tmux/reset-an-option-back-to-its-default-value.md
Normal file
32
tmux/reset-an-option-back-to-its-default-value.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Reset An Option Back To Its Default Value
|
||||||
|
|
||||||
|
Once you start changing the values of options, tmux can be opaque about what
|
||||||
|
the original default values were.
|
||||||
|
|
||||||
|
For instance, if you change the `escape-time` option with the following
|
||||||
|
command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ tmux set-option -g escape-time 0
|
||||||
|
```
|
||||||
|
|
||||||
|
It's now set to `0`, so without digging through the tmux man pages, how do you
|
||||||
|
figure out what the default was and restore it?
|
||||||
|
|
||||||
|
The `set-option` command takes the `-u` flag to _unset_ the option. This will
|
||||||
|
restore it to the default.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ tmux set-option -u escape-time
|
||||||
|
```
|
||||||
|
|
||||||
|
And you can now see the original default value with `show-option`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ tmux show-option escape-time
|
||||||
|
500
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `set-option -u` with any option to restore it to its default.
|
||||||
|
|
||||||
|
Find `set-option` in `man tmux` for more details.
|
||||||
Reference in New Issue
Block a user