All Questions
12
questions
1
vote
1
answer
540
views
Preserve command history in chronological order (in fish)
I have noticed that default behaviour for storing command history is only storing the latest entry.
Typing ls and then ls -al and then entering history would show:
ls -al
ls
Typing ls once more would ...
1
vote
1
answer
714
views
How to remove leading file path information from fish shell tab-complete suggestions?
Using fish, typing ls <tab> in an example directory, the terminal displays:
$ ls
bar/ dir/ foo/
Continuing with d<tab><tab> this becomes:
$ ls dir/
dir/moredir/ dir/otherdir/ ...
0
votes
1
answer
286
views
Is it possible to have an abbreviation in a shell anywhere in a command?
I have a directory which has a really long path. However, I use this directory constantly and I cannot move it (WSL Windows directory). I generally use z to jump around to it quickly which is useful, ...
4
votes
1
answer
3k
views
/bin/bash shell (macOS) throwing `-bash: declare: -A: invalid option` error message at shell start
I briefly changed my default shell on macOS Catalina (10.15.1) to Fish, following the steps in Fish's documentation.
First, I executed > echo /usr/local/bin/fish | sudo tee -a /etc/shells followed ...
1
vote
1
answer
1k
views
how to enable command line navigation shortcuts in fish shell running in iTerm on Mac
Setup: MacOs Mojave, iTerm, Fish shell 3.0.2, using fisher have theme bob-the-fish installed as well.
Would like to be able to use command line navigation keyboard shortcuts such as ctrl-A to get t ...
1
vote
2
answers
2k
views
Running command for bash in fish shell
I'm trying to identify all the large files in my git repo history and came across this command posted here.
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(...
1
vote
1
answer
181
views
Issue with wrong command entered in fish-shell and it's output
Actually I am using fish these days and I completely switched from bash to fish (with chsh & terminal startup command) but the matter is when I enter a wrong command e.g. qwerty its output is: ...
1
vote
0
answers
262
views
Why does fish shell create a hidden process in iTerm2
I've moved from bash to fish shell in iTerm2. However, whenever I start iTerm2, I receive the following error message:
A session ended very soon after starting. Check that the command in
profile ...
5
votes
1
answer
973
views
In fish shell, which command is equivalent to bash's compgen?
compgen is a useful command, and fish is an excellent command shell. But I cannot find an equivalent in fish.
I write one by myself:
function compgen --description 'Print a list of documented fish ...
0
votes
2
answers
148
views
Unescaped commandline content in fish shell
Is there a way to get the unescaped content of command line in fish? I mean if command line is like ...
$ ls 'foo' "bar"
... the desired output would be ls 'foo' "bar".
The commandline fish command ...
50
votes
7
answers
20k
views
What is the equivalent of bash's !$ and !! in the fish shell?
I've been using bash for a decade or so and have gotten used to being able to type !$ to repeat the last argument, e.g.:
$ mkdir foo
$ cd !$
cd foo
(That last line is printed by the shell to tell ...
4
votes
1
answer
1k
views
Quote or bracket completion in bash, without pressing TAB
Is there any way to have bash autocomplete matching symbols like '"[{( with their right handed counterparts?
I would like to do this without having to press tab.
For example typing the string echo " ...