Skip to content

Commit 350c423

Browse files
committed
Update prev to use an alias
see knqyf263/pet#72
1 parent b5b3413 commit 350c423

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

aliases

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@ alias ls="ls -l ${colorflag}"
1313
# List all files colorized in long format, including dot files
1414
# alias l="ls -tlAh ${colorflag}"
1515
alias l="exa -l --git -a -h --time-style=long-iso"
16-
16+
alias lr="exa -l --git -a -h --time-style=long-iso -T -L=2"
1717

1818
# List only directories
1919
alias lsd='ls -l ${colorflag} | grep "^d"'
2020

2121
# Always use color output for `ls`
2222
alias ls="command ls ${colorflag}"
2323
alias be="bundle exec"
24-
alias man='man -P less'
24+
alias man="man -P less"
2525
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete; find . -name '._*' -ls -delete;"
26-
alias cdproj="tech open $@"
27-
complete -F _projs cdproj
2826
alias e="$EDITOR"
2927
alias vi='nvim'
3028

3129
if [ $(uname -s) = "Darwin" ]; then
3230
eval "$(hub alias -s)"
33-
alias ack-grep=ack
3431
fi
35-
# Simulate OSX's pbcopy and pbpaste on other platforms
32+
# Simulate OSX pbcopy and pbpaste on other platforms
3633
if [ $(uname -s) = "Linux" ]; then
37-
alias pbcopy='xsel --clipboard --input'
38-
alias pbpaste='xsel --clipboard --output'
34+
alias pbcopy='xsel --clipboard --input'
35+
alias pbpaste='xsel --clipboard --output'
3936
fi
4037

4138
alias freq='cut -f1 -d" " $HISTFILE | sort | uniq -c | sort -nr | head -n 30'
4239
alias https='http --default-scheme=https'
4340
alias dockspace="defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' && killall Dock"
44-
alias klog="kubectl get pods -o=jsonpath="{.items[*].metadata.labels.app}" | tr ' ' '\n' | uniq | fzf --header='App :' | xargs stern --exclude \"(/health/all|/api/public/build_version)\" --tail 100"
41+
alias klog="kubectl get pods -o=jsonpath="{.items[*].metadata.labels.app}" | tr ' ' '\n' | uniq | fzf --header='App :' | xargs stern --exclude \"(/health/all|/api/public/build_version/)\" --tail 100"
42+
alias ksql="psql service=\"$(basename $(pwd))\""
43+
alias cat=ccat
44+
alias prev='cmd=$(fc -ln -2 -2 | sed -E "s/^[ \\t]*//; s/[ ]*\$//"); eval pet new $(printf %q "$cmd")'

functions

-5
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ function editconflicts() {
163163
vim +/"<<<<<<<" -p "$(git diff --name-only --diff-filter=U | xargs)"
164164
}
165165

166-
function prev() {
167-
PREV=$(fc -lrn | head -n 1)
168-
sh -c "pet new `printf %q "$PREV"`"
169-
}
170-
171166
fvim() {
172167
local IFS=$'\n'
173168
local files=($(fzf --query="$1" --multi --select-1 --exit-0))

0 commit comments

Comments
 (0)