Fish Shell: How to quit into the current directory #578
cleissonalves
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are two methods
1. Using a keymap (The simple method)
Add the keymap to
~/.config/joshuto/keymap.toml
. You can change the key if you want. I usedx
.Add joshuto funtion alias(Optional)
First create the file
j.fish
inside the directory~/.config/fish/functions
.Add the following content to the file and save it.
The name of the file and the name of the function must be the same.
This name will be used to run joshuto in the terminal. In my example, I used
j
.So, to run joshuto in the terminal i just type:
And to exit into the current directory, i press:
2. Using a function (a little more complicated)
First create the file
j.fish
inside the directory~/.config/fish/functions
.Add the following content to the file and save it.
The name of the file and the name of the function must be the same.
This name will be used to run joshuto in the terminal.
In my example, I used
j
.So, to run joshuto in the terminal i just type:
Check the keymap that exits joshuto with
quit --output-current-directory
in the~/.config/joshuto/keymap.toml
.The default is:
You can change the key if you want.
Then when exiting joshuto with this key, the fish shell will use the current directory.
Beta Was this translation helpful? Give feedback.
All reactions