Skip to content

Commit a8c556f

Browse files
committed
✨ Add difftastic
1 parent 67637dd commit a8c556f

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

.bash_profile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ PS1="⨊ 𝕯𝓭𝓵:\[\033[36m\]\w\[\033[m\]$ " # ⚛ ⨊ 𝓓𝔇𝒟ℓℒ
132132

133133
# functions
134134

135-
alias kubetop="watch -n4 ~/git/kubetop.py"
135+
alias kubetop="watch -n4 python ~/git/kubetop.py"
136136
# https://gist.github.com/ddelange/24575a702a10c2cb6348c4c7f342e0eb
137137
kubelogs() {
138138
# View logs as they come in (like in Rancher) using mktemp and less -r +F.

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Note: first open Chrome for the first time
312312
- Use built-in keychain and app password from above, and add a Mac specific global gitignore:
313313
```bash
314314
git config --global user.name "ddelange"
315-
git config --global user.email "14880945+ddelange@users.noreply.github.com" # https://github.com/settings/emails
315+
git config --global user.email "ddelange@users.noreply.github.com"
316316
git config --global credential.helper osxkeychain
317317

318318
# EITHER
@@ -331,6 +331,7 @@ Note: first open Chrome for the first time
331331
gpg --armor --export <key-here> # paste this key at github.com/settings/keys
332332
git config --global user.signingkey <key-here>
333333
git config --global commit.gpgsign true
334+
git config --global gpg.program "$(which gpg)"
334335
# sign tags using git tag -s
335336
```
336337
- To [enable password caching](https://stackoverflow.com/a/38422272/5511061) for 1 week:
@@ -368,7 +369,7 @@ git config --global alias.co "checkout"
368369
git config --global alias.mt "mergetool"
369370
git config --global alias.st "status"
370371
# split diff - needs icdiff (see below) - use `git icdiff` to keep output in terminal after less quits
371-
git config --global alias.df '! f() { diff=$(git icdiff --color=always "$@") && test "$diff" && echo "$diff" | less -eR; }; f'
372+
git config --global alias.df '! f() { diff=$(git difft "$@") && test "$diff" && echo "$diff" | less -eR; }; f'
372373
# who needs the default verbose git log? - also try `git lg --all`
373374
git config --global alias.lg "log --graph --oneline"
374375
# tested with GitHub remote - ref https://stackoverflow.com/questions/28666357#comment101797372_50056710
@@ -416,13 +417,20 @@ git config --global alias.undo '! f() { git reset --hard $(git rev-parse --abbre
416417
##### Split diff
417418

418419
- `git df` (above) uses less that keeps a clean terminal
419-
- `git icdiff` (below) uses new core.pager that leaves less output in terminal after exiting
420+
- `git icdiff` and `git difft` (below) uses new core.pager that leaves less output in terminal after exiting
420421

421422
```bash
422-
pip install git+https://github.com/jeffkaufman/icdiff.git
423423
git config --global --replace-all core.pager 'less -+$LESS -eFRSX' # with double quotes, $ will be evaluated
424-
git config --global icdiff.options "--highlight --line-numbers --numlines=3"
425-
git config --global difftool.icdiff.cmd 'icdiff --highlight --line-numbers --numlines=3 $LOCAL $REMOTE'
424+
425+
# with diff highlighting
426+
pip install git+https://github.com/jeffkaufman/icdiff.git # installs git-icdiff for `git icdiff``
427+
git config --global icdiff.options "--highlight --line-numbers --numlines=3 --color=always"
428+
git config --global difftool.icdiff.cmd 'icdiff --highlight --line-numbers --numlines=3 --color=always $LOCAL $REMOTE'
429+
430+
# with syntax & diff highlighting
431+
brew install difftastic
432+
git config --global difftool.difft.cmd 'difft --display=side-by-side-show-both --color=always --background=light "$LOCAL" "$REMOTE"'
433+
git config --global alias.difft 'difftool --tool difft --no-prompt'
426434
```
427435

428436

htoprc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Beware! This file is rewritten by htop when settings are changed in the interface.
22
# The parser is also very primitive, and not human-friendly.
3+
htop_version=3.1.2
4+
config_reader_min_version=2
35
fields=0 48 17 18 38 39 2 46 47 49 1
46
sort_key=46
5-
sort_direction=1
6-
tree_sort_key=0
7-
tree_sort_direction=1
7+
sort_direction=-1
8+
tree_sort_key=46
9+
tree_sort_direction=-1
810
hide_kernel_threads=1
911
hide_userland_threads=1
1012
shadow_other_users=1
1113
show_thread_names=0
1214
show_program_path=1
1315
highlight_base_name=1
16+
highlight_deleted_exe=1
1417
highlight_megabytes=1
1518
highlight_threads=1
1619
highlight_changes=0
@@ -20,6 +23,7 @@ strip_exe_from_cmdline=1
2023
show_merged_command=0
2124
tree_view=0
2225
tree_view_always_by_pid=0
26+
all_branches_collapsed=1
2327
header_margin=1
2428
detailed_cpu_time=0
2529
cpu_count_from_one=1
@@ -30,8 +34,9 @@ account_guest_in_cpu_meter=0
3034
color_scheme=0
3135
enable_mouse=1
3236
delay=10
33-
left_meters=AllCPUs2 CPU Memory Swap
34-
left_meter_modes=1 1 1 1
35-
right_meters=DateTime Tasks LoadAverage Uptime
36-
right_meter_modes=2 2 2 2
3737
hide_function_bar=0
38+
header_layout=two_50_50
39+
column_meters_0=AllCPUs2 CPU Memory Swap
40+
column_meter_modes_0=1 1 1 1
41+
column_meters_1=DateTime Tasks LoadAverage Uptime
42+
column_meter_modes_1=2 2 2 2

0 commit comments

Comments
 (0)