Comments (18)
What's your fish version? fish --version
?
from oh-my-fish.
2.1.1
Let me know what environment info you need to debug, thanks!
from oh-my-fish.
I would like to understand why function -V
isn't working for you. What does function --help
outputs to you?
from oh-my-fish.
function, with any flags or none, followed by a newline, sets about 8
spaces (maybe a tab?) into my shell and doesn't do anything or give any
indication of error.
Subsequent characters including newline appear at that offset. This
continues until a Ctrl-c is used to clear the line.
No new prompt is printed, as if I'd never submitted function as a command.
echo (function)
Prints
"fish: Could not locate end of block. The "end" command is missing,
misspelled or a ";" is missing."
Without the outermost quotes, and that command stays in the line despite
the newline.
It's definitely weird, seems like a syntax error in the "function"
definition maybe?
Thanks,
Max
On Oct 31, 2015 3:55 PM, "Derek Willian Stavis" [email protected]
wrote:
I would like to understand why function -V isn't working for you. What
does function --help outputs to you?—
Reply to this email directly or view it on GitHub
#147 (comment)
.
from oh-my-fish.
Don't worry, what you described is what should happen. I wanted to know the output of function --help
to check if it supports -V
, but your fish version confirms it does.
from oh-my-fish.
Another question: Could you try again omf update
after reloading your shell? Does it work?
from oh-my-fish.
This is happening for me as well, on Ubuntu GNOME 15.04. https://asciinema.org/a/ao9dnlxme55rkyxwapbdkqb47
from oh-my-fish.
Can you please paste me the output of this:
set my_var "aaaa"
function -V my_var test_function
echo $my_var
end
test_function
set my_var
function -V my_var test_function
echo $my_var
end
test_function
PS: Thanks for the asciinema, very useful!!
from oh-my-fish.
I love asciinema, it's pretty great.
http://asciinema.org/a/1qkpb86byyy53w7zxjn8yzoqr
from oh-my-fish.
With the indentation behaviour I mentioned, it simply outputs an error
function: Unknown option "my_var" Current functions are: . N_ alias autoload ...snip...
On Nov 4, 2015 1:04 PM, "Derek Willian Stavis" [email protected]
wrote:
Can you please paste me the output of this:
set my_var "aaaa"function -V my_var test_function
echo $my_varend
set my_varfunction -V my_var test_function
echo $my_varend—
Reply to this email directly or view it on GitHub
#147 (comment)
.
from oh-my-fish.
It looks to me that you happen to be using a very old version of fish, which does not support arguments to function
built in.
from oh-my-fish.
It's the Ubuntu repo version, I'll file a bug over there. Thanks.
from oh-my-fish.
The output of function --help
should look like the one below, which includes ‐V
. I'm currently using fish 2.2.0.
⋊> ~/.l/s/omf on master ○ function --help
function ‐‐ create a function
Synopsis
function [OPTIONS] NAME; BODY; end
Description
function creates a new function NAME with the body BODY.
A function is a list of commands that will be executed when the name of the function is given as a
command.
The following options are available:
· ‐a NAMES or ‐‐argument‐names NAMES assigns the value of successive command‐line arguments to the names
given in NAMES.
---------------------------------- lots of other options ----------------------------------
· ‐V or ‐‐inherit‐variable NAME snapshots the value of the variable NAME and defines a local variable
with that same name and value when the function is executed.
from oh-my-fish.
The version is >= 2, I would track down the bug but unfortunately I have no
time.
If it persists over the next update I'll do the deep dive to find it.
Thanks!
On Nov 4, 2015 4:56 PM, "Derek Willian Stavis" [email protected]
wrote:
The output of function --help should look like the one below, which
includes ‐V. I'm currently using fish 2.2.0.⋊> ~/.l/s/omf on master ○ function --help
function ‐‐ create a function
Synopsis
function [OPTIONS] NAME; BODY; endDescription
function creates a new function NAME with the body BODY.A function is a list of commands that will be executed when the name of the function is given as a command. The following options are available: · ‐a NAMES or ‐‐argument‐names NAMES assigns the value of successive command‐line arguments to the names given in NAMES. · ‐d DESCRIPTION or ‐‐description=DESCRIPTION is a description of what the function does, suitable as a completion description. · ‐w WRAPPED_COMMAND or ‐‐wraps=WRAPPED_COMMAND causes the function to inherit completions from the given wrapped command. See the documentation for complete for more information. · ‐e or ‐‐on‐event EVENT_NAME tells fish to run this function when the specified named event is emitted. Fish internally generates named events e.g. when showing the prompt. · ‐v or ‐‐on‐variable VARIABLE_NAME tells fish to run this function when the variable VARIABLE_NAME changes value. · ‐j PGID or ‐‐on‐job‐exit PGID tells fish to run this function when the job with group ID PGID exits. Instead of PGID, the string ’caller’ can be specified. This is only legal when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution. · ‐p PID or ‐‐on‐process‐exit PID tells fish to run this function when the fish child process with process ID PID exits. · ‐s or ‐‐on‐signal SIGSPEC tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP). · ‐S or ‐‐no‐scope‐shadowing allows the function to access the variables of calling functions. Normally, any variables inside the function that have the same name as variables from the calling function are ’shadowed’, and their contents is independent of the calling function. · ‐V or ‐‐inherit‐variable NAME snapshots the value of the variable NAME and defines a local variable with that same name and value when the function is executed.
—
Reply to this email directly or view it on GitHub
#147 (comment)
.
from oh-my-fish.
If it helps - I'm experiencing this as well with
> fish --version
fish, version 2.1.1
On Fedora 21 using the default repo version of fish
from oh-my-fish.
Okay so it seems the issue is that Fedora (and Ubuntu, apparently) is distributing an outdated fish as 2.1.1.
This is odd.. What's the resolution process on that?
from oh-my-fish.
Yeah, this is the only explanation for the issue. I would recommend you trying to use official fish package distribution: http://software.opensuse.org/download.html?project=shells%3Afish%3Arelease%3A2&package=fish
from oh-my-fish.
Aha, the issue was a problem with my system configuration interacting with the yum repos.
Thanks for the support, I apologize for any wild goose chase this may have caused.
To those with this problem, make sure the repo.xml.key has been imported to GPG so that fish can receive updates.
Thanks again!
from oh-my-fish.
Related Issues (20)
- Installation failure from curl on Pop-os HOT 4
- 'omf install powerline' responding with "Please install powerline" and not being usable HOT 1
- Is this project active? HOT 2
- Installer checksum in README.md isn't up to date.
- Print error: failed to parse choice argument: 2- HOT 2
- Cannot omf update or install packages
- All plugins
- Z
- OMF's offline installation doesn't really work offline
- Theme not updating even after using command for theme change.
- This no longer supports Fish 2.2.0
- Can't change the theme HOT 1
- I just install OMF and installed the cyan theme and this happened HOT 2
- I see a `[I]` in my fish! HOT 2
- oh-my-fish crashes Garuda-Update process HOT 2
- Remove [I] in the prompt HOT 1
- Installer does not check `$OMF_PATH` permissions
- Prompt Encoding as Question Mark HOT 2
- OMF not found no matter how hard i try to install it HOT 3
- fish get broken after vim run top or else HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oh-my-fish.