Initial commit
This commit is contained in:
commit
29daecb0ce
23 changed files with 3745 additions and 0 deletions
4
fish/aliases.fish
Normal file
4
fish/aliases.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function mkae; make; end
|
||||
function vim; command vim -p $argv; end
|
||||
function rm; command rm -I $argv; end
|
||||
function mux; command tmuxinator $argv; end
|
||||
10
fish/config.fish
Normal file
10
fish/config.fish
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
set -x GREP_OPTIONS
|
||||
set fish_greeting ""
|
||||
set -x ncpus (grep -c "^processor" /proc/cpuinfo)
|
||||
set -x EDITOR vim
|
||||
set -x PAGER less
|
||||
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||
|
||||
source ~/.config/fish/aliases.fish
|
||||
|
||||
10
fish/functions/cd.fish
Normal file
10
fish/functions/cd.fish
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Modified cd that also displays the directory's contents if the listing is less than 5 lines long
|
||||
function cd
|
||||
if test -n "$argv"
|
||||
if test -e $argv -a ! -d (realpath $argv)
|
||||
set argv (dirname $argv)
|
||||
end
|
||||
end
|
||||
builtin cd $argv
|
||||
and test (ls -C -w $COLUMNS |wc -l) -le 5; and ls
|
||||
end
|
||||
7
fish/functions/fish_prompt.fish
Normal file
7
fish/functions/fish_prompt.fish
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function fish_prompt
|
||||
printf "\e[37m%s\e[96m%s" (hostname) (prompt_pwd)
|
||||
if test $VIRTUAL_ENV
|
||||
printf " \e[37m(%s)" (basename $VIRTUAL_ENV)
|
||||
end
|
||||
printf " \e[91m<3\e[0m "
|
||||
end
|
||||
7
fish/functions/fish_right_prompt.fish
Normal file
7
fish/functions/fish_right_prompt.fish
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function fish_right_prompt
|
||||
set stat $status
|
||||
if test $stat -ne 0
|
||||
printf "\e[91m(%d) " $stat
|
||||
end
|
||||
printf "\e[37m%s\e[0m" (__fish_git_prompt "%s")
|
||||
end
|
||||
5
fish/functions/fish_user_key_bindings.fish
Normal file
5
fish/functions/fish_user_key_bindings.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function fish_user_key_bindings
|
||||
bind \co sudo-execute
|
||||
bind \cv foreground-vi
|
||||
bind \cq quote-word
|
||||
end
|
||||
3
fish/functions/foreground-vi.fish
Normal file
3
fish/functions/foreground-vi.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function foreground-vi
|
||||
fg %vi >/dev/null
|
||||
end
|
||||
4
fish/functions/md.fish
Normal file
4
fish/functions/md.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function md
|
||||
mkdir "$argv"
|
||||
cd "$argv"
|
||||
end
|
||||
4
fish/functions/quote-word.fish
Normal file
4
fish/functions/quote-word.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function quote-word -d "Command line editor function that cycles between 'quoting' \"styles\" for the current word"
|
||||
commandline -t (commandline -t|sed 's/^\'\(.*\)\'$/\1/;t;s/^"\(.*\)"$/\'\1\'/;t;s/^\(.*\)$/"\1"/')
|
||||
commandline -f repaint
|
||||
end
|
||||
3
fish/functions/sa.fish
Normal file
3
fish/functions/sa.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function sa
|
||||
ssh-add "$HOME/.ssh/id_rsa.$argv"
|
||||
end
|
||||
5
fish/functions/sudo-execute.fish
Normal file
5
fish/functions/sudo-execute.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function sudo-execute -d "Command line editor function that prepends the current commandline with \"sudo\" and executes it afterwards"
|
||||
commandline sudo\ (commandline | sed 's/^\W*sudo\?\W*//')
|
||||
commandline -f repaint
|
||||
commandline -f execute
|
||||
end
|
||||
7
fish/prompt_settings.fish
Normal file
7
fish/prompt_settings.fish
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set -g __fish_git_prompt_showuntrackedfiles ""
|
||||
set -g __fish_git_prompt_showdirtystate ""
|
||||
set -g __fish_git_prompt_showupstream "auto"
|
||||
|
||||
set -g __fish_git_prompt_char_upstream_ahead "↑"
|
||||
set -g __fish_git_prompt_char_upstream_behind "↓"
|
||||
set -g __fish_git_prompt_char_upstream_prefix ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue