fish: more config and functions
This commit is contained in:
parent
ee4d07abc2
commit
b93bcbba4e
7 changed files with 34 additions and 8 deletions
6
cli/.config/fish/conf.d/globals.fish
Normal file
6
cli/.config/fish/conf.d/globals.fish
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set -x LESS 'i M R'
|
||||||
|
set -x PAGER less
|
||||||
|
set -x EDITOR nvim
|
||||||
|
set -x TIME_STYLE long-iso
|
||||||
|
set -x SSH_AUTH_SOCK "$HOME/.ssh/ssh_auth_sock"
|
||||||
|
set -x ALTERNATE_EDITOR ""
|
6
cli/.config/fish/conf.d/prompt.fish
Normal file
6
cli/.config/fish/conf.d/prompt.fish
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set prompt_sep_a \ue0b0
|
||||||
|
set prompt_bang \n\ (set_color brblue)\u266a\
|
||||||
|
set git_sign \ue0a0
|
||||||
|
set color_fg brwhite
|
||||||
|
set color_git_branch 3c3c3c
|
||||||
|
set color_git yellow blue red purple
|
|
@ -1,11 +1,4 @@
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
set prompt_sep_a \ue0b0
|
|
||||||
set prompt_bang \n\ (set_color brblue)\u266a\
|
|
||||||
set git_sign \ue0a0
|
|
||||||
set color_fg brwhite
|
|
||||||
set color_git_branch 3c3c3c
|
|
||||||
set color_git yellow blue red purple
|
|
||||||
|
|
||||||
set -l grc_cmds \
|
set -l grc_cmds \
|
||||||
iptables ipneighbor ipaddr iproute ip nmap netstat \
|
iptables ipneighbor ipaddr iproute ip nmap netstat \
|
||||||
traceroute tcpdump ss ping \
|
traceroute tcpdump ss ping \
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
function gsi
|
function gsi
|
||||||
tig status
|
termcompat tig status
|
||||||
end
|
end
|
||||||
|
|
3
cli/.config/fish/functions/s.fish
Normal file
3
cli/.config/fish/functions/s.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function s
|
||||||
|
termcompat ssh $argv
|
||||||
|
end
|
15
cli/.config/fish/functions/termcompat.fish
Normal file
15
cli/.config/fish/functions/termcompat.fish
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
function termcompat
|
||||||
|
set -l term $TERM
|
||||||
|
switch $term
|
||||||
|
case 'alacritty*' 'kitty*' 'wezterm' 'xterm-*'
|
||||||
|
set term xterm
|
||||||
|
case 'rxvt-unicode-*'
|
||||||
|
set term rxvt-unicode
|
||||||
|
case 'tmux*'
|
||||||
|
set term screen.xterm-new
|
||||||
|
end
|
||||||
|
begin
|
||||||
|
set -lx TERM $term
|
||||||
|
command $argv
|
||||||
|
end
|
||||||
|
end
|
3
cli/.config/fish/functions/tig.fish
Normal file
3
cli/.config/fish/functions/tig.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function tig
|
||||||
|
termcompat tig $argv
|
||||||
|
end
|
Loading…
Reference in a new issue