Kurtis Rader
6e02ec83d1
Fix typo in xdg-mime completion functions
2017-08-17 10:54:05 -07:00
MoritzKn
5eb0b34da1
Update xdg-mime helper
...
This will respect the `/usr/local/share/applications/` directory when
fetching mime infos.
Update xdg-mime helper to comply with the xdg spec.
This also makes sure __fish_print_xdg_applications_directories only prints
directories that exist.
Relevant specs:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
https://specifications.freedesktop.org/desktop-entry-spec/latest/ape.html
2017-08-17 10:50:06 -07:00
sentriz
72173a93a7
Accept return as a valid answer to 'Edit the file again?'
...
Also, check for affirmative answer so a random string isn't taken as a
"yes" response.
2017-08-14 18:18:41 -07:00
Fabian Homborg
4e2b11f2e0
help: Fix error if no argument is given
2017-08-14 18:18:10 -07:00
Sam Yu
d87c0424d8
Speedup git prompt
...
Fix __fish_git_prompt too slow under repo with lots of untracked
files when __fish_git_prompt_showuntrackedfiles enabled.
2017-08-06 13:24:33 -07:00
Kurtis Rader
8b79f4e5c9
use the new set -a
and set -p
in our scripts
2017-08-04 18:02:24 -07:00
Kurtis Rader
d4fb75e9f3
fix bug in abbr
function
...
I introduced a bug in the `abbr` function with commit 17dff8c
by
referencing the undefined `$cmd` variable. This fixes that.
2017-08-03 23:52:07 -07:00
Kurtis Rader
17dff8c569
rewrite abbr
function
...
Rewrite the `abbr` function to store each abbreviation in a separate
variable. This greatly improves the efficiency. For the common case
it is 5x faster. For pathological cases it is upwards of 100x faster.
Most people should be able to unconditionally define abbreviations in
their config.fish without a noticable slow down.
Fixes #4048
2017-08-03 14:35:06 -07:00
Kurtis Rader
1a55e9ba60
Merge branch 'master' into major
2017-07-29 21:58:15 -07:00
Kurtis Rader
4e026588f4
modify prev commit to use builtin cd
...
Using the `cd` function can have undesirable side effects like mucking
with the directory history. So force the use of the builtin cd.
2017-07-27 14:36:32 -07:00
Kurtis Rader
defdc92b57
fix ssh config Include
file handling
...
Fixes #4253
2017-07-27 14:36:32 -07:00
Kurtis Rader
92f39f7b89
fix bug introduced by commit 86af63cd3
2017-07-25 14:03:40 -07:00
Kurtis Rader
35a7db50a2
fix bug introduced by commit 86af63cd3
2017-07-25 14:02:50 -07:00
Kurtis Rader
8e87d595b7
remove some uses of $IFS
...
This is a step towards resolving issue #4156 . It replaces uses of `$IFS`
with other solutions.
2017-07-24 20:45:43 -07:00
Kurtis Rader
d068f846e8
simplify history
function
...
The fix for #4232 allows us to simplify the `history` function slightly.
2017-07-21 16:26:15 -07:00
Kurtis Rader
d376cb316f
simplify history
function
...
The fix for #4232 allows us to simplify the `history` function slightly.
2017-07-21 16:25:03 -07:00
Fabian Homborg
e0f0164b16
Quote $USER when used with switch
or test
...
Common in prompts, this would fail if $USER is empty.
See #4229 .
2017-07-20 19:45:32 +02:00
Kurtis Rader
0dc92fbb2d
a make style-all
cleanup
2017-07-18 22:40:25 -07:00
Kurtis Rader
69ecda5082
update math
to use the new argparse validation
2017-07-18 15:03:08 -07:00
Kurtis Rader
4e1303823b
add ability for argparse
to validate args
...
Fixes #4211
2017-07-18 14:42:50 -07:00
Kurtis Rader
403d9691cb
fix handling of ssh
aliases
...
Fixes #4213
2017-07-17 21:13:21 -07:00
Kurtis Rader
8f22def8f7
return to psub --file
being the default
...
The recent change to switch `psub` to use `argparse` caused it to use
a fifo by default because it inadvertently fixed a long standing bug in
the fish script. This changes the behavior back to `psub --file` being
the default behavior and introduces a `--fifo` flag. It also updates the
documentation to make it clearer when and why `--fifo` mode should not
be used.
Fixes #4222
2017-07-17 14:33:51 -07:00
Kurtis Rader
3e226f0a5e
implement a new implicit int option spec
...
While updating the `history` function to use `argparse` I realized it is
useful to define an option that can be used in three ways. First by
using the short flag; e.g., `-n NNN`. Second by using the long flag;
e.g., `--max NNN`. Third, as an implicit int flag; e.g., `-NNN`. This
use case is now supported by a spec of the form `n#max`.
2017-07-16 18:27:41 -07:00
Kurtis Rader
c22df3b823
update history
to use argparse
2017-07-16 15:13:39 -07:00
Kurtis Rader
f2c8e73891
add more alias unit tests
...
A recent regression to the `alias` command points out the need for more
unit tests of its behavior. I also decided to use it as an opportunity
to normalize the output of just `alias` to list aliases.
2017-07-15 17:36:36 -07:00
Kurtis Rader
98449fec51
fix math
regression
...
The previous change to use `argparse` for parity with every other
builtin and function introduced a regression. Invocations that start
with a negative number can fail because the negative value looks like an
invalid flag.
2017-07-14 16:03:31 -07:00
Kurtis Rader
ff4d275f22
remove left over debug statement
2017-07-14 08:18:41 -07:00
Kurtis Rader
49a0841533
update type
to use argparse
2017-07-13 15:19:02 -07:00
Kurtis Rader
51bbecc419
update realpath
to use argparse
2017-07-13 14:33:11 -07:00
Kurtis Rader
3e6c57d5d3
update psub
to use argparse
2017-07-13 14:12:51 -07:00
Kurtis Rader
30940916bd
update prompt_pwd
to use argparse
2017-07-13 14:12:51 -07:00
Kurtis Rader
51a52a7286
update open
to use argparse
2017-07-13 14:12:51 -07:00
Kurtis Rader
e8243af20b
update math
to use argparse
2017-07-13 14:12:47 -07:00
Kurtis Rader
140e6204be
update help
to use argparse
2017-07-13 13:49:15 -07:00
Kurtis Rader
86af63cd39
update funcsave
to use argparse
2017-07-13 13:35:26 -07:00
Kurtis Rader
6ecd0bcb32
update funced
to use argparse
2017-07-13 13:29:35 -07:00
Kurtis Rader
df65ed8696
update dirs
to use argparse
2017-07-13 11:53:29 -07:00
Kurtis Rader
30baf8d101
convert dirh
to use argparse
2017-07-13 11:50:57 -07:00
Kurtis Rader
f156bea1b7
convert alias
to use argparse
2017-07-13 11:47:41 -07:00
Kurtis Rader
05aae4764b
convert popd
and pushd
to use argparse
2017-07-13 11:31:08 -07:00
Kurtis Rader
5ac8c42fad
convert nextd
to use argparse
...
Also fix a bug I introduce in `prevd` when I converted it to use `argparse`.
2017-07-13 11:30:48 -07:00
Kurtis Rader
3a782003ed
have argparse report the proper command name
2017-07-12 22:38:32 -07:00
Kurtis Rader
abef2cc422
convert nextd
to use argparse
2017-07-12 22:38:32 -07:00
Kurtis Rader
5cf2a50269
convert isatty
to use argparse
2017-07-12 22:38:32 -07:00
Kurtis Rader
3c4e3035fd
switch from getopt
to argparse
...
Convert our two functions that use `getopt` to use our new `argparse`
builtin.
Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
a4dc2b872b
implement fish_opt
helper command
...
This implements a `fish_opt` command that provides a way for people
to create option specs for the `argparse` command as an alternative to
creating such strings by hand.
Fixes #4190
2017-07-12 22:38:32 -07:00
David Marchal
e1951a32bb
Fixed __fish_complete_users to better format GECOS
2017-07-11 17:00:08 +02:00
Kurtis Rader
8cc4639ea6
implement cdh
command
...
Fixes #2847
2017-07-05 13:25:18 -07:00
tamanugi
170f11771b
Add function __fish_complete_user_at_hosts
...
This function list hostnames;
if commandline hoge@~ , it list hoge@(hostname)
2017-07-05 16:24:45 +02:00
Kurtis Rader
4853ec0281
harden psub
again an undef TMPDIR
2017-07-04 16:35:32 -07:00