Code Monkey home page Code Monkey logo

dotfiles-fish's Introduction

my fish-shell dotfiles

untested. only for personal backup & reference

usage

mv ~/.config/fish ~/.config/fish.bak

git clone [email protected]:mcfog/dotfiles-fish.git ~/.config/fish

related homebrew formulas

  • fish
  • fasd
  • fzf
  • nvm
  • thefuck
  • direnv

original stuff

jf

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'

jh

fuzzy history jump. try jump around serveral place and jh or alt+h

key binding

bind \eh 'jh' 'commandline -f repaint'

copypwd

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

copyhash

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

cdf

function cdf --description "cd into latest finder path" 
  cd (osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')
end

other

dotfiles-fish's People

Contributors

mcfog avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.