1,022
questions
-1
votes
0
answers
24
views
Prompt Gets Truncated Instead of Wrapping When Terminal Window Is Small Using Starship, Fish Shell and Terminator [closed]
When I resize my terminal window to be smaller, the prompt gets truncated with an ellipsis (...) instead of wrapping onto the next line. However, prompts that were already displayed before resizing ...
0
votes
1
answer
26
views
How to bind a key to just another key in fish
I am trying to bind the key sequence control-h (\ch in fish) to the right arrow key. I know how to bind it to backward-char with bind the normal way, but that poses an issue in my config, since I have ...
0
votes
4
answers
79
views
Is there a way to have fish-shell use GNU coreutils printf function?
Ran into an issue when running the following command in a fish shell:
❯ printf '%q\n' 'André Previn & London Symphony Orchestra'
%q: invalid conversion specification
I hadn't realized at first ...
0
votes
1
answer
16
views
How to pipe on a condition in Fish?
See previous question, How to pipe on a condition in Bash. I'm interested in the same construct for Fish, i.e. shorthand for:
set check 0
if test $check = 1
printf "foo\nbar\nbaz\n" | ...
1
vote
2
answers
49
views
FISH Shell - Cannot `cd -` when extending builtin cd
I have a custom cd function that looks like:
function cd -d "cd with auto conda activation"
# set -gx OLDPWD (pwd) <-- uncommenting this does not resolve issue
builtin cd $param $...
0
votes
0
answers
20
views
How to change the ssh connection shell of pycharm on windows to the default bash on the server?
I installed the fish shell on my server, but I found that it seems to be detrimental to my ability to connect to the server with ssh. When I connect to the server and run it, debugging the code, ...
0
votes
3
answers
53
views
Is it possible to setup FISH alias based on different OS or available command?
I see Define an alias in fish shell, and I know how to setup alias and/or functions,
But is it possible to setup different alias target based on OS? Maybe use function?
What I experience isn't ...
0
votes
2
answers
55
views
Why does the or operator in fish seem to not work
function shapeshift
argparse 'h/help' -- $argv
if not set -q argv[1] $argv or if set -q _flag_help
echo "Shapeshift lets you change into another root system."
echo "...
2
votes
1
answer
61
views
Git stash: How to stash tracked files into a single stash via script?
I often do something like git add/checkout/stash -- (find -name "*.extension").
For example, to revert all text files or all images.
It works fine with add and checkout.
When using add, ...
0
votes
2
answers
202
views
Error: fish: ${ is not a valid variable in fish
So I'm trying to run this command to turn files into a .chd file:
for i in *.cue; do chdman createcd -i "$i" -o "${i%.*}.chd"; done
But I get this error:
fish: ${ is not a valid ...
0
votes
1
answer
68
views
Fish Abbreviation to Run Heredocs in Bash
I am trying to write an abbreviation that will do the following:
if there is << in the whole buffer somewhere, it will enclose it with bash -c "<the-buffer>"
So, If I run
tee $...
0
votes
0
answers
264
views
Fish Shell Default PATH
I have a 2023 MacBook Pro that I use to run many python scripts from the terminal using Fish. I use the home-brew python3 installation to avoid messing with my system install, but I am having issues ...
2
votes
1
answer
267
views
Get previous command in Fish shell
Is there a way to get the previous command (with its parameters) in Fish shell? I.e. not its exit code/status but the actual command given.
My use case is that I'd like to know the previous command in ...
0
votes
1
answer
43
views
Add `where:` field to fish_history?
Fish history search (ctrl+R) currently only displays time and commands.
I think it would be useful to add a "- where: {path when executing the command}" field here.
- cmd: cat -n ~/.local/...
0
votes
2
answers
586
views
How to load a .env file's environment variables into both Bash and Fish shells on startup?
I want to have a .env file with a bunch of name-value pairs, like:
VAR1=xxx
VAR2=yyy
# sample C include dir use case
INCLUDE_DIR=/etc/include/xxx
I want these variables to be available in both bash ...