Skip to content

Commit

Permalink
fish: Add and use cdz
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Dec 20, 2024
1 parent 080e382 commit 44a2fa7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fish/functions/cde.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Copyright (C) 2021-2023 Nathan Chancellor

function cde -d "Change to env folder"
z $ENV_FOLDER
cdz $ENV_FOLDER
end
2 changes: 1 addition & 1 deletion fish/functions/cdt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Copyright (C) 2022-2023 Nathan Chancellor

function cdt -d "Change to $TMP_FOLDER"
z $TMP_FOLDER
cdz $TMP_FOLDER
end
11 changes: 11 additions & 0 deletions fish/functions/cdz.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env fish
# SPDX-License-Identifier: MIT
# Copyright (C) 2024 Nathan Chancellor

function cdz -d "Use z for changing directory if running interactively, cd otherwise"
if type -q z
z $argv
else
cd $argv
end
end

0 comments on commit 44a2fa7

Please sign in to comment.