untested. only for personal backup & reference
mv ~/.config/fish ~/.config/fish.bak
git clone [email protected]:mcfog/dotfiles-fish.git ~/.config/fish
- fish
- fasd
- fzf
- nvm
- thefuck
- direnv
inspired by http://dmitryfrank.com/articles/shell_shortcuts
basic commands
# remove cwd from fav list
~ $ favdel
bookmark deleted
# add cwd to fav list
# optionally add some comment
~ $ fav this is my home
bookmark added
# list your bookmarks
~ $ favls
/private/tmp #
/Users/mcfog #this is my home
# MAGIC!!
~ $ jf
if you feel jf<enter>
is not fast enough, you may add key binding entry to functions/fish_user_keybindings
bind \ej 'jf' 'commandline -f repaint'
fuzzy history jump. try jump around serveral place and jh
or alt+h
key binding
bind \eh 'jh' 'commandline -f repaint'
function copypwd --description "copy \$PWD to clipboard. powered by `pbcopy` the clipboard utility for osx"
echo -n $PWD | pbcopy
echo "$PWD copied to clipboard"
end
function copyhash --description "copy current git commit hash to clipboard. powered by `pbcopy` the clipboard utility for osx"
git rev-parse HEAD | tr -d '\n' | pbcopy ; and echo "copied: "(pbpaste)
end
function cdf --description "cd into latest finder path"
cd (osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')
end