Created
August 19, 2023 14:54
-
-
Save edgarogh/b6a1cb7e5cdb08c81339fb111be6a2b7 to your computer and use it in GitHub Desktop.
cdd — run a command from within another directory + fish completion. Install in `~/.config/fish/` and consider underscores as directory separators.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
complete -c cdd -n '__fish_is_first_token' -x -a '(__fish_complete_directories)' | |
complete -c cdd -n 'not __fish_is_first_token' -x -a '(__fish_complete_subcommand --fcs-skip=2)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cdd -d "cd à durée déterminée" | |
pushd $argv[1] | |
$argv[2..-1] | |
popd | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment