blob: a9d98cbb48b573e7d4d04ccc5f087790ab06eae8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Disable greeting
set fish_greeting
set -g fish_key_bindings fish_vi_key_bindings
set -U grc_plugin_ignore_execs ls systemctl
bind -M insert \cz 'fg ; commandline -f repaint'
function ssht
ssh -t "$argv" "tmux new-session -A -s 'ssh-$HOST'"
end
function cdt
builtin cd (mktemp -d)
builtin pwd
end
function sll --description "Recursively resolve a symbolic link"
for path in $argv
set -l seen_inodes
while test -L $path
set inode (stat -c %i $path)
if contains $inode $seen_inodes
echo "Infinite recursion detected"
return 1
end
set -a seen_inodes $inode
ll -d $path || return 1
set previous_dir (path dirname $path)
set path (readlink $path | path normalize)
if not string match -q "/*" $path
set path (path normalize "$previous_dir/$path")
end
end
ll -d $path || return 1
end
end
function expand_equal_command
type -P (string sub --start 2 $argv)
end
abbr -a expand_equal_command --position anywhere --regex "^=.+" --function expand_equal_command
|