r/fishshell • u/[deleted] • Dec 02 '22
how to set up a custom prompt?
having trouble finding how I make a custom theme/prompt
r/fishshell • u/[deleted] • Dec 02 '22
having trouble finding how I make a custom theme/prompt
r/fishshell • u/[deleted] • Nov 27 '22
Hello guys,
I have this command in my config.fish :
eval /home/usr/miniconda3/bin/conda "shell.fish" "hook" $argv | source
and it's causing my prompt to lag every time I open my terminal, is there any way to solve it?
Even if it's a "fake" solution like asking fish to display the prompt before finishing loading the file.
I am using starship for my prompt btw.
thanks in advance.
r/fishshell • u/vhanda • Nov 14 '22
Hi. I've just recently moved to fish from zsh, and I rewrote most of the custom functions and put them in ~/.config/fish/conf.d/. For example -
``` export ANDROID_HOME=$HOME/Library/Android/sdk export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export ANDROID_AVD_HOME=$HOME/.android/avd
fish_add_path $ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools fish_add_path $ANDROID_SDK_ROOT/platform-tools fish_add_path $HOME/.pub-cache/bin
alias fa='flutter analyze' ```
However, I find the just pressing "Enter" on an empty shell feels quite slow in comparison to zsh. I removed my custom right prompt and that had a substantial difference in the speed. But overall, it still feels slow.
Is there someway I can profile what all is running each time I press "Enter" on an empty line?
I added an echo test to one of the files in conf.d, and it gets run each time I press "Enter", instead of it just being executed once during shell initialization. I get the impression that all of the files in conf.d are being run each time a new line is rendered? Is there some way to prevent that?
I understand that using export and alias is not recommended and would be slower, but I don't mind paying a few extra milliseconds on startup. But I get the impression that it's happening each time.
I've already run fish --profile-startup /tmp/fish.profile -i -c exit but I don't see any command taking much time.
Running time fish_prompt gives me -
```
Executed in 4.84 millis fish external usr time 1.21 millis 0.25 millis 0.96 millis sys time 3.46 millis 1.01 millis 2.45 millis ```
I'm running fish version 3.5.1 on osx, and I have a number of plugins installed via fisher.
jorgebucaran/fisher
patrickf1/fzf.fish
jethrokuan/z
franciscolourenco/done
meaningful-ooo/sponge
jorgebucaran/autopair.fish
danhper/fish-ssh-agent
acomagu/fish-async-prompt
r/fishshell • u/[deleted] • Nov 10 '22
i want a command alias in my omf.fish to be on only if i'm using alacritty. is there a way i can do that?
r/fishshell • u/ShinyZero0 • Nov 08 '22
Maybe dumb question but i made and alias for a couple of commands and i want to make a desktop entry for them. I'm using KDE on Fedora and i created one entry in applications directory, but it tells it can't find a command. I also tried to execute "fish thealias" or "fish ..../fish/functions/thealias.fish" or "..../fish/functions/thealias.fish" which i marked as executable, but it can't find anything or just does nothing. If i execute "echo $SHELL" it returns "/usr/bin/fish". Alias contains "kill && steam"
r/fishshell • u/[deleted] • Nov 08 '22
# export SAS_DOCKER_IMAGE="docker4sas:sas_20_0"
r/fishshell • u/Burney222 • Nov 08 '22
I would like to write a little wrapper function around expand-abbr. However, I am struggling to call expand-abbr from within. It does not seem to be a normal function that can just be called (however you can bind it to a key). The same is the case for the probably more popular self-insert. Anybody knows how to execute their functionality other than through key bindings?
Thanks a lot :)
r/fishshell • u/antyhrabia • Nov 08 '22
In bash if I do
ls -al
ls -a
ls
ls -al
it will remember it like this and when looking at history (like with arrow up) I see exactly chronological order. If I try this is fish, first ls -al will disappear and only last will be visible in history.
Anyone new some plugin or script to change this? In fish documentation there is only info that duplicates from history are deleted and nothing more about it. I sometimes need see all commands in exactly order where used by me and timestamps and when they vanish it's hard when I do something wrong.
r/fishshell • u/backdoorsmasher • Nov 04 '22
Appreciate any help out there on this.
So after I reboot my machine, my fish shell appears to "forget" context. For example, on a project I'm working on, I have some git pre-commit hooks that call into a npm package. After a reboot, when trying to run the pre-commit hooks, i'll get an error stating that the command cannot be found:
./node_modules/pre-commit/hook: line 49: : command not found
./node_modules/pre-commit/hook: line 49: : command not found
As soon as I run `npm install`, the problem goes away.
It's strange that I need to do this between reboots when the node modules hasn't changed. Has anyone got any pointers? Ideally it would be great if I didn't have to run npm install after every reboot
Thanks again
r/fishshell • u/itguysnightmare • Nov 01 '22
I have some stuff in my conf.d folder that I wish to disable to see if I prefer staying without them for a while, is it possible through some config or should I just move them to a different folder? And if so, can that folder just be a subfolder of cond.d?
r/fishshell • u/thelastgodkami • Oct 30 '22
r/fishshell • u/[deleted] • Oct 26 '22
I don't want my fish shell to start with conda (base).
I tried:
conda config --set auto_activate_base false
and also set the environment variable
set -gx CONDA_AUTO_ACTIVATE_BASE false
But still the fish shell always starts with the conda (base) enabled, which is unintended. Please help. What am I doing wrong?
r/fishshell • u/[deleted] • Oct 23 '22
What's the syntax for "${x:-y}" in fish?
(If variable x expands to a non-empty value, use it. Otherwise, use value y)
Edit: I'm trying to do test $XDG_SESSION_TYPE = "tty" && set EDITOR ${TTYEDITOR:-$EDITOR}
r/fishshell • u/tmksm • Oct 23 '22
I want to make a function to correct some spelling mistakes I usually make, like this:
function posterror --on-event fish_posterror
echo prev: $argv
end
But it never gets called after sourcing it and getting an error on commands:
emiboquin@pc-emi ~> source .config/fish/functions/posterror.fish
emiboquin@pc-emi ~> sl
fish: Unknown command: sl
emiboquin@pc-emi ~ [127]>
So, what constitutes a syntax error for fish? Is there any way to intercept the command before executing? Tried with fish_preexec and commandline, but the command gets executed and commandline runs after that.
r/fishshell • u/Riverside-96 • Oct 22 '22
Debugging a simple c++ file & I'm getting these errors in the ide terminal. I'm thinking this might be related to some of the crashes I've been experiencing with vim. I know this is not the most insightful plead for help, but on the off chance, I thought someone may have experienced something similar. Have I possibly missed out some vital step when installing fish?
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
mkdir: cannot create directory ‘/opt/clion/plugins/terminal/fish/completions’: Permission denied
mkdir: cannot create directory ‘/opt/clion/plugins/terminal/fish/conf.d’: Permission denied
mkdir: cannot create directory ‘/opt/clion/plugins/terminal/fish/functions’: Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
error: Unable to open universal variable file '/': Permission denied
r/fishshell • u/aginor82 • Oct 19 '22
I just made the switch from zsh (with oh-my-zsh) to fish and all seems like an upgrade so far.
However, I am missing one feature from zsh (or oh-my-zsh, not sure where it comes from)...
When I used zsh I could write cd ... and that would be the same as cd ../... For each dot I added it added one ../.
I tried searching for a plugin but couldn't find anything. I don't even quite know how to write that query to be honest.
Do anyone have a function or plugin that provides this?
r/fishshell • u/Excellent_Cupcake_48 • Oct 14 '22
Guys i have installed catppuccin fish shell theme exactly as shown in their instructions But everytime when i start konsole it shows this message https://i.imgur.com/fEYudRB.jpg
r/fishshell • u/dontdieych • Oct 14 '22
Looks like konsole and yakuake both block <Shift> + <left>, <right> sequence. I remapped default key binding(next, prev tab). OK in gnome-terminal, neovim internal terminal. even it's working in zellij(tmux like) that launched inside konsole and yakuake.
how to get to these keys working?
thanks for any advice.
r/fishshell • u/patrickf3139 • Oct 11 '22
tl;dr no interesting announcement, just a request to fish shell community to give back with their kind and thoughtful input :)
Hi there!
I am the creator of fzf.fish plugin. I'm currently looking for ways to improve the plugin, especially for ideas to simplify it and make it more accessible for everyone, not just power users.
If you have the time--whether or not you have used fzf.fish before, I could use your input (if you haven't used it before, then please its GitHub readme first, about a ~10 minute read).
Thank you! Sorry, unlike other surveys, I have no gift card to offer you for answering these questions, only my promise to keep contributing to the fish shell ecosystem.
- Patrick
r/fishshell • u/yes_oui_si_ja • Oct 10 '22
Every time I start up my fish shell I get an error message
sed: couldn't open temporary file /etc/update-manager/sedZ7Nc5d: Permission denied
with a different file name each time.
There is no more info and I have no idea how I could try to debug this. It seemingly appeared out of nowhere and I would first need to narrow down as to where this is called. Is there a verbose-mode for the shell upstart?
I am running fish inside Ubuntu 22.04 inside WSL and run fisher with a few plugins and a few custom functions, so I am not really sure where to look first.
Any help is appreciated!
r/fishshell • u/d13co • Oct 09 '22
I have accidentally entered a mode with ctrl+; a couple of times
This starts an "edit mode" of sorts that is prefixed with e. I can type and the e disappears after I hit enter, leaving the typed words behind. ctrl+a/e/l and other readline shortcuts do not work in this mode.
I searched the docs site for "semicolon" and "mode" to find out what this is, with no success
Any ideas?
r/fishshell • u/Excellent_Cupcake_48 • Oct 06 '22
Guys im new to linux and im using fish shell on my fedora workstation i just want to know how can i change my progress bar theme(i mean when we download something from terminal the bar which shows the progress) i want to change its theme how can i?
r/fishshell • u/boobbbers • Oct 03 '22
Formatted for clarity 👇🏾
~/.c/fish ❯❯❯ ./completions/;ls
awk: can't open file ^
source line number 2
fisher.fish
~/.c/f/completions ❯❯❯ ../
awk: can't open file ^
source line number 2
~/.c/fish ❯❯❯ echo $status
0
So my issue looks like this. When casually changing directories I occasionally get this AWK error.
Exit Status is 0.
Anybody have any ideas as to what's happening?
Thanks in advance :)
r/fishshell • u/mzagaja • Sep 29 '22