sophs
link
fedilink
English
111Y

Idk about bash but at least in fish I can do alt + arrows to move the cursor by word, also alt + backspace works to delete whole words.

@feifei@feddit.de
link
fedilink
English
71Y

Also in some Windows programs. Infuriating

TWeaK
link
fedilink
English
71Y

More often it’s Ctrl + backspace that doesn’t work. Ctrl + <- works nearly everywhere.

@playxdestroy@lemmy.ml
link
fedilink
English
41Y

i’ve noticed ctrl + backspace works in windows 11 where it didn’t work in 10

TWeaK
link
fedilink
English
5
edit-2
1Y

I hope you don’t expect that to convince me to upgrade.

@Kryomaani@sopuli.xyz
link
fedilink
English
2
edit-2
1Y

They’ve since updated it to allow you to display labels & not condense multiple windows into one button so it’s better than ever. I can’t believe it took until 11 to center the items, left aligning was a literal pain in the neck especially on ultrawide screens.

TWeaK
link
fedilink
English
11Y

I prefer the left alignment, but I’m glad to hear they finally fixed the combined button thing. I still won’t stand for the right click menus and general fuckery with settings pages and keyboard shortcuts.

@ralC@lemmy.fmhy.ml
link
fedilink
English
131Y

Getting the little boxes when renaming files. Uuuuuuuuggghhh

@Ascend910@lemmy.ml
link
fedilink
English
31Y

Does anyone know how to fix it in bash?

It works for me, which terminal are you using?

@xthexder@l.sw0.com
link
fedilink
English
41Y

Why is your user flagged as a bot account? You certainly aren’t behaving like a bot.

@Ascend910@lemmy.ml
link
fedilink
English
11Y

Maybe it’s because I join and in a few day I create several communities and commented into too much. I am just trying to replace Reddit lol

@xthexder@l.sw0.com
link
fedilink
English
11Y

There’s a “Bot Account” checkbox in your user profile settings. You should be able to just deselect it, and you’ll be a normal user.

@Raphael@lemmy.world
link
fedilink
English
10
edit-2
1Y

apt install fish

https://fishshell.com/

fish is nice but the nonstandard syntax gets really annoying after a while. I use ble.sh these days.

@Raphael@lemmy.world
link
fedilink
English
11Y

I have no such weakness because I never learned bash syntax anyway.

@maess@feddit.de
link
fedilink
English
21Y

so this is why I can’t relate to the meme

@Ascend910@lemmy.ml
link
fedilink
English
61Y

You didn’t read my comment properly :(

@Ascend910@lemmy.ml
link
fedilink
English
11Y

deleted by creator

cumberboi (any/all)
link
fedilink
English
2
edit-2
1Y

SO TRUE OMG, also why the hell does it have to use ctrl + shift for shortcuts aaaa

@jw13@beehaw.org
link
fedilink
English
31Y

CTRL-C has been the default key combination to terminate a running process, since forever. Reassigning it to “copy selection” would be very inconvenient.

I like the solution of the ElementaryOS terminal: when you press CTRL-C, it does “the right thing” depending on the context.

cumberboi (any/all)
link
fedilink
English
21Y

ohhh shoot thats cool! ty for the info :)

I’ve never used a distro that didn’t come with a sane default shell config to avoid this

@AlexWIWA@lemmy.ml
link
fedilink
English
3
edit-2
1Y

Mind bogglingly infuriating

@mawkler@lemmy.ml
link
fedilink
English
261Y

b

Ctrl+a - go to beginning of line (alpha? I dunno)

ctrl+e - go to (e)nd of the line

alt+f - (f)orward one word

alt+b - (b)ack one word

You might already know these but no one else has posted them on this thread yet. I work in both Linux and Mac a lot and this works for them. No idea about Windows I’m no longer forced to use it at work 🙂

@dot20@lemmy.world
link
fedilink
English
111Y

If you use WSL (which you should), you have a normal Bash, so it works

The best part of Windows is the part that isn’t Windows lmao lawd I’m glad I don’t work for the federal government (exclusively Microsoft) anymore

darcy
link
fedilink
English
31Y

fed detected

Also Ctrl + w to delete one word backwards (which is what OP wants to do)

@FUsername@feddit.de
link
fedilink
English
41Y

While we’re at it: Alt+d deletes the next word.

@chaorace@lemmy.sdf.org
link
fedilink
English
91Y

That’s why my terminal is emacs

I think you mean OS

That’s why my terminal is OS

@grue@lemmy.world
link
fedilink
English
61Y

Emacs and bash use the same navigation shortcuts though, LOL.

@Vegoon@feddit.de
link
fedilink
English
21Y

set -o vi

@sLLiK@lemmy.ml
link
fedilink
English
11Y

This. Esc, then b. Or if you’re a stickler for keeping you hands on home row, Ctrl [ does the trick as well. Bonus points for making that more comfortable via a remapping of Caps Lock to control (or swapping the two).

Bold of you to assume that an Emacs user will have anything remotely resembling the default keymap by the time they’re proud enough to brag about it

Train yourself to use edit-and-execute and this problem disappears forever. Now I’m annoyed when I type “esc v v” and nothing happens.

@debil@lemmy.world
link
fedilink
English
371Y

In a sane editor just press b.

Nailbar
link
fedilink
English
71Y

Is Ctrl + ⬅️ for typing ‘b’ then?

@debil@lemmy.world
link
fedilink
English
51Y

No (although you can easily create such a key mapping if so inclined). To type b character one must first enter the so called Insert mode. Depending on where exactly you wish to type the character, you can enter the Insert mode by typing for example i, a, I, A, o or O.

Nailbar
link
fedilink
English
51Y

It wasn’t a serious question 🙂

Sounds like you’re talking about good old vi or vim.

Thurstylark
link
fedilink
English
31Y

readline vim mode would like to have a word…

Cold Hotman
link
fedilink
English
561Y

@baseless_discourse@mander.xyz
link
fedilink
English
21
edit-2
1Y

Actually, most linux terminal allows you to change shortcut in terminal to just use ctrl-c and ctrl-v.

Cold Hotman
link
fedilink
English
31Y

oh my i didnt know

The one I use just wants me to do ctrl+shift+v

By default, yes, but most terminal allow you to just open the setting and change the keybinding. And even Ctrl-c will work as you expect, it will copy when text is selected, and terminate command otherwise.

Ctrl+shift+v is paste without formatting in most apps though, so kind of a good habit

Drew Belloc
link
fedilink
English
131Y

If i knew it before, now my brain just knows that it need to press shift on the terminal

I'm Hiding 🇦🇺
link
fedilink
English
81Y

We have the middle-mouse-button clipboard for this.

@maeries@feddit.de
link
fedilink
English
171Y

Why is that actually?

SokathHisEyesOpen
link
fedilink
English
21
edit-2
1Y

Because fuck you! That’s why!

Edit: serious answer, I’m pretty sure it’s outputting the key events to the terminal line.

@gornius@lemmy.world
link
fedilink
English
261Y

Because terminal emulators are literally the old terminal emulators (ye oldy screens + keyboard combos that looked like a computer but were just IO) and everything modern they do is just a hack.

@grue@lemmy.world
link
fedilink
English
16
edit-2
1Y

Terminals with screens? What’s all that newfangled shit?

Nah, whippersnapper, this tech goes all the way back to teletypes. You didn’t get a fancy-shmancy “screen;” instead, it printed out the results of your commands. On actual paper!


Seriously though, that’s why the device files for terminals in Linux are named tty[$NUM] – “tty” is shorthand for “TeleTYpe.”

I believe it’s also why really primitive programs can’t scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they’re using a version of the control protocol so primitive that it didn’t have a function to go backwards because teletypes didn’t need it due to physical impossibility. (That’s my theory, anyway – I haven’t dug deep enough into the guts of TERMCAP etc. to be sure. I’m also not actually old enough to have experienced that stuff, despite my joke above.)


Edit: look at this excerpt from man terminfo(5), for instance:

Basic Capabilities
The number of columns on each line for the terminal is given by
the cols numeric capability.  If the terminal is a CRT, then the
number of lines on the screen is given by the lines capability.
If the terminal wraps around to the beginning of the next line
when it reaches the right margin, then it should have the am
capability.  If the terminal can clear its screen, leaving the
cursor in the home position, then this is given by the clear
string capability.  If the terminal overstrikes (rather than
clearing a position when a character is struck over) then it
should have the os capability.  If the terminal is a printing
terminal, with no soft copy unit, give it both hc and os.

To this day, the info database entry for your virtual terminal has to specify that it’s capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn’t!

I didn’t even know I can Ctrl + arrow keys to move from word to word and I have been using computers for over 20 years …

Ctrl+backspace to delete previous word.
Ctrl+delete to delete next work.

It also works with Shift so you can highlight and select words at a time.

EnPeZe
link
fedilink
English
71Y

Hey, I actually knew that shortcut! But it never occurred to me that ctrl+arrow just moves the cursor without selecting anything.

wild stuff.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog