Browse Source

➡️ move / rename: function multicd

main
Florian Geiger 2 weeks ago
parent
commit
8bd7bc0d3a
Signed by: Florian Geiger <geigerfl81129@th-nuernberg.de> GPG Key ID: 554629389DC7E467
3 changed files with 5 additions and 7 deletions
  1. 0
    7
      .config/fish/config.fish
  2. 4
    0
      .config/fish/functions/multicd.fish
  3. 1
    0
      .gitignore

+ 0
- 7
.config/fish/config.fish View File

@@ -203,13 +203,8 @@ if status is-interactive # Commands to run in interactive sessions can go here
or true

########## abbreviations ##########
# cd .... file:///usr/share/doc/fish/interactive.html#abbreviations
function multicd
echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end
abbr --add dotdot --regex '^\.\.+$' --function multicd


function trash # fixme
# # Check if the command was invoked by an abbreviation
# if test $argv = tt
@@ -237,8 +232,6 @@ if status is-interactive # Commands to run in interactive sessions can go here
end
end


# own abbreviations
abbr --add e $EDITOR
abbr --add cl clear
abbr --position anywhere --add pp '|'

+ 4
- 0
.config/fish/functions/multicd.fish View File

@@ -0,0 +1,4 @@
# going up a number of directories file:///usr/share/doc/fish/interactive.html#abbreviations
function multicd
echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end

+ 1
- 0
.gitignore View File

@@ -38,6 +38,7 @@
!/.config/fish/config.fish
!/.config/fish/functions/
!/.config/fish/functions/fish_user_key_bindings.fish
!/.config/fish/functions/multicd.fish

# git
!/.config/git/

Loading…
Cancel
Save