Skip to content

Commit 481032c

Browse files
committed
Add instruction for setting a terminal tab title
1 parent fd0aab5 commit 481032c

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tools/dev.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,31 @@
99

1010
## Notes
1111

12+
### Terminal
13+
14+
#### Tab Title
15+
16+
To set the title of a terminal tab,
17+
18+
``` bash
19+
$ echo -n -e "\033]0;{{title}}\007"
20+
```
21+
22+
To package as a command-line tool, add the following to the platform-specific configuration file for configuring user environments (e.g., [`.bash_profile`][bash-profile], [`.profile`][bash-profile], [`.bashrc`][bash-profile].
23+
24+
``` bash
25+
tab() {
26+
echo -n -e "\033]0;$*\007"
27+
}
28+
```
29+
30+
which can then be invoked
31+
32+
``` bash
33+
$ tab title
34+
```
35+
36+
1237
### ls
1338

1439
#### Directory Tree
@@ -84,6 +109,8 @@ A few comments:
84109

85110
[sed-find-and-replace]: http://stackoverflow.com/questions/11392478/how-to-replace-a-string-in-multiple-files-in-linux-command-line
86111

112+
[bash-profile]: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_01.html
113+
87114
</section>
88115

89116
<!-- /.links -->

0 commit comments

Comments
 (0)