You are not logged in.
Hello folks,
I am a new user to this system as whole. Installed the system and up and running in no time with the excellent wiki and past Q&As.
With that out of the way, I am learning around my way into Bash scripting slowly. I installed this tool 'fzf' with pacman.
What I have done (& things I am aware of) -
1. Basically installed with Pacman.
2. I know the wiki wants me to source the files from /usr/share/fzf/.
3. I see two files 'completion.bash' & 'keybindings.bash' there.
4. Checked out the Wiki and Bash docs to do it and scrounging in the internet for the answers - to no avail.
- Putting this line in .bashrc
- "source /usr/share/fzf/completion.bash & . /usr/share/fzf/key-bindings.bash"
Any guidance will be highly appreciated.
Solution - I kept 'fi' as 'alias'. Changing that from 'fi' solve it.
Last edited by 8luesman (2019-09-16 20:35:47)
Offline
What, exactly, is your question?
The wiki entry is pretty unambiguous: source those two files from your .bashrc, eg.:
source /usr/share/fzf/key-bindings.bash
Offline
As I understand the syntax isn't clear for the OP yet. The wiki expects you to add this to your bashrc:
~/.bashrc
#!/bin/bash
# ...
source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash
There is a link to what source means on that page. Hope this helps you along.
Offline
1. Basically installed with Pacman.
Basically?
2. I know the wiki wants me to source the files from /usr/share/fzf/.
3. I see two files 'completion.bash' & 'keybindings.bash' there.
4. Checked out the Wiki and Bash docs to do it and scrounging in the internet for the answers - to no avail.
bash
Source the desired files from your .bashrc:/usr/share/fzf/key-bindings.bash
/usr/share/fzf/completion.bash
Note the word "source" there is a link which provides further guidance on how to source files.
- Putting this line in .bashrc
- "source /usr/share/fzf/completion.bash & . /usr/share/fzf/key-bindings.bash"
That should work, but it's rather odd. It will background the sourcing of the first one, and for some reason you use 'source' for one and '.' for another. Just source each of them individually.
Any guidance will be highly appreciated.
Guidance on what? Are you having a problem? You haven't described or demonstrated any problem. If you are not sure about what you have in your bashrc, post it's content.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
As I understand the syntax isn't clear for the OP yet. The wiki expects you to add this to your bashrc:
~/.bashrc
#!/bin/bash # ... source /usr/share/fzf/key-bindings.bash source /usr/share/fzf/completion.bash
There is a link to what source means on that page. Hope this helps you along.
I have done exactly this. And the response on restarting the st terminal is as given below -
bash: /usr/share/fzf/key-bindings.bash: line 35: syntax error near unexpected token `}'
bash: /usr/share/fzf/key-bindings.bash: line 35: `}'
bash: /usr/share/fzf/completion.bash: line 114: syntax error near unexpected token `}'
bash: /usr/share/fzf/completion.bash: line 114: `}'
bluesman ~ :( $ scrot -s
If I were doing correctly, I would have definite results of doing "cd ** <tab>", isn't that right?
Offline
Please show your .bashrc. This sounds like a dangling bracket somewhere.
Offline
Please show your .bashrc. This sounds like a dangling bracket somewhere.
# ~/.bashrc
#fortune -a | fmt -80 -s | $(shuf -n 1 -e cowsay cowthink) -$(shuf -n 1 -e b d g p>
#system maintenance
alias ls="ls --color=auto"
alias dir="dir --color=auto"
alias grep="grep --color=auto"
alias dmesg='dmesg --color'
alias p="sudo pacman --color=auto"
alias pi="ping www.archlinux.org"
alias fi="fuseiso"
alias fm="fusermount"
alias t="transmission-remote"
#Sourcing fzf files
source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash
Thank you for your support.
Last edited by 8luesman (2019-09-16 19:23:08)
Offline
The first line must be the shebang. Add it at the very top of the file as shown in my post before.
Offline
Shebangs are not necessary for rc files. Clearly the file is being parsed.
The error is indicating a problem in the fzf-provided files. I looked at them, but it looks a bit crazy to me.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
You are absolutely correct @Trilby. My bad!
Now I see the problem. Do not alias "fi" !
Offline
You are absolutely correct @Trilby. My bad!
Now I see the problem. Do not alias "fi" !
Thanks Swiggles. That's it.
Regards,
8luesman
Offline