Skip to content

Commit 3d7f496

Browse files
committed
fix trailing spaces in path and a few other things gemini caught when throwing it the output of fish_trace 1
1 parent 82b38ba commit 3d7f496

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

.aliases

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ alias wget="curl -O"
5959
alias cleanup_dsstore="find . -name '*.DS_Store' -type f -ls -delete"
6060

6161
alias diskspace_report="df --si /"
62-
alias free_diskspace_report="diskspace_report"
6362

6463
# Shortcuts
6564
alias g="git"

.bash_profile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ setupPATH() {
88
if [ -d "$P" ]; then
99
export PATH="$PATH:$P"
1010
fi
11-
# read these files but strip out comments and newlines.
12-
done < <(tac ~/.paths ~/.paths.local 2> /dev/null | sed 's|#.*||')
11+
#subread these files but strip out comments, extra whitespace, and empty lines
12+
done < <(tac ~/.paths ~/.paths.local 2> /dev/null | sed 's|#.*||' | sed 's/^[ \t]*//;s/[ \t]*$//' | sed '/^$/d')
1313
}
1414
setupPATH;
1515

@@ -40,6 +40,12 @@ export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
4040
export LESS_TERMCAP_ue=$'\E[0m' # end underline
4141
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
4242

43+
44+
# Skip line-numbers and grid. https://github.com/sharkdp/bat/blob/e608b331425ca2ce8f8d0bd37e7f90901f91eb99/src/style.rs#L27-L61
45+
# In the future this can be `default,-numbers,-grid` but they haven't released in 18months so.....
46+
export BAT_STYLE="changes,header-filename,header-filesize,snip,rule"
47+
48+
4349
##
4450
## HISTORY settings...
4551
##

.exports

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ export FZF_DEFAULT_COMMAND='fd'
3737
export FZF_CTRL_T_COMMAND='fd'
3838
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always {} 2>/dev/null || tree -C {}'"
3939

40-
# Skip line-numbers and grid. https://github.com/sharkdp/bat/blob/e608b331425ca2ce8f8d0bd37e7f90901f91eb99/src/style.rs#L27-L61
41-
# In the future this can be `default,-numbers,-grid` but they haven't released in 18months so.....
42-
export BAT_STYLE="changes,header-filename,header-filesize,snip,rule"
43-
4440

4541
export CLOUDSDK_PYTHON=/usr/bin/python3
4642

fish/aliases.fish

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ abbr bwre brew
3535
abbr brwe brew
3636

3737
abbr cat 'bat -P'
38-
set -x BAT_STYLE "header,header-filesize,header-filename,changes"
38+
# Skip line-numbers and grid. https://github.com/sharkdp/bat/blob/e608b331425ca2ce8f8d0bd37e7f90901f91eb99/src/style.rs#L27-L61
39+
# In the future this can be `default,-numbers,-grid` but they haven't released in 18months so.....
40+
set -x BAT_STYLE "changes,header-filename,header-filesize,snip,rule"
3941

4042
alias push="git push"
4143

@@ -117,7 +119,6 @@ alias sorteduniq-asc="sort | uniq -c | sort --ignore-leading-blanks --numeric-so
117119

118120

119121
alias diskspace_report="df --si /"
120-
alias free_diskspace_report="diskspace_report"
121122

122123

123124
alias hosts='sudo $EDITOR /etc/hosts' # yes I occasionally 127.0.0.1 twitter.com ;)

fish/config.fish

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
# todo, investigate later.
33
# status stack-trace
44

5-
# upfront add homebrew stuff to path
65

6+
# Debugging
77
# set fish_trace 1
8+
# fish_trace 1 outputs 3,500 lines when spawning a fresh shell.
9+
810
# /Users/paulirish/.homebrew/bin/fish --debug "*" # super noisy
9-
# see `fish --print-debug-categories`
10-
# /Users/paulirish/.homebrew/bin/fish --debug "abbrs ast-construction char-encoding complete config debug env-dispatch env-export env-locale error event exec exec-fork exec-job-exec exec-job-status fd-monitor history history-file iothread output-invalid path proc-internal-proc proc-job-run proc-pgroup proc-reap-external proc-reap-internal proc-termowner profile-history reader reader-render screen term-support topic-monitor uvar-file uvar-notifier warning warning-path"
11+
# see `fish --print-debug-categories`
12+
# fish --debug "$(fish --print-debug-categories | grep -v "ast-construction" | sed 's| .*||' | string join ',')"
13+
# ^ outputs 11,400 lines of spawning a fresh shell
1114

1215
function fish_greeting
1316
end
@@ -27,15 +30,13 @@ function ssource --description "source most of my dotfiles, useful if making cha
2730
source ../private/extras.fish
2831
end
2932

30-
# for things not checked into git..
33+
# for things not checked into git
3134
if test -e "$HOME/.extra.fish";
3235
source ~/.extra.fish
3336
end
3437
end
3538

3639

37-
fish_add_path $HOME/.homebrew/bin; fish_add_path $HOME/homebrew/bin; # so i can use utils in startup
38-
3940
ssource;
4041

4142
# I don't need a prompt symbol for you-got-things-in-yr-stash
@@ -95,8 +96,6 @@ set __fish_git_prompt_color_dirtystate 'red'
9596
set __fish_git_prompt_color_upstream_ahead ffb90f
9697
set __fish_git_prompt_color_upstream_behind blue
9798

98-
# Local prompt customization
99-
set -e fish_greeting
10099

101100

102101
set -g fish_pager_color_completion normal
@@ -105,13 +104,6 @@ set -g fish_pager_color_prefix cyan
105104
set -g fish_pager_color_progress cyan
106105

107106

108-
# ctrl-b invokes the fancy boi. but this doesnt really work right.
109-
bind \cb git-recent-with-fzf-and-diff
110-
if bind -M insert > /dev/null 2>&1
111-
bind -M insert \cb git-recent-with-fzf-and-diff
112-
end
113-
114-
115107

116108
string match -q "$TERM_PROGRAM" "vscode"
117109
and . (code --locate-shell-integration-path fish)

fish/functions.fish

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ function conda -d 'lazy initialize conda'
206206
conda $argv
207207
end
208208

209+
210+
function cargo -d 'lazy initialize cargo'
211+
functions --erase cargo
212+
sh "$HOME/.cargo/env"
213+
cargo $argv
214+
end
215+
209216
# NVM doesnt support fish and its stupid to try to make it work there.
210217

211218

0 commit comments

Comments
 (0)